-static void
-usage(char *prog_name, int exit_code)
-{
- printf("Usage: %s [TARGET] [ACTION...]\n"
- "Targets:\n"
- " -t, --target=TARGET Path to Unix domain socket\n"
- "Actions:\n"
- " -l, --list List current settings\n"
- " -s, --set=MODULE[:FACILITY[:LEVEL]]\n"
- " Set MODULE and FACILITY log level to LEVEL\n"
- " MODULE may be any valid module name or 'ANY'\n"
- " FACILITY may be 'syslog', 'console', 'file', or 'ANY' (default)\n"
- " LEVEL may be 'emer', 'err', 'warn', 'info', or 'dbg' (default)\n"
- " -r, --reopen Make the program reopen its log file\n"
- " -e, --execute=COMMAND Execute control COMMAND and print its output\n"
- "Other options:\n"
- " -h, --help Print this helpful information\n"
- " -V, --version Display version information\n",
- prog_name);
- exit(exit_code);
-}
+static void usage(void);
+static const char *parse_command_line(int argc, char *argv[]);
+static struct unixctl_client *connect_to_target(const char *target);