summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/usbmuxd.82
-rw-r--r--src/main.c16
2 files changed, 13 insertions, 5 deletions
diff --git a/docs/usbmuxd.8 b/docs/usbmuxd.8
index c40760c..dd7a032 100644
--- a/docs/usbmuxd.8
+++ b/docs/usbmuxd.8
@@ -47,7 +47,7 @@ device is attached.
Run in udev operation mode (implies -n, -b and -z).
.TP
.B \-s, \-\-systemd
-Run in systemd operation mode (implies -z and -f).
+Run in systemd operation mode (implies -z).
.TP
.B \-x, \-\-exit
Notify a running instance to exit if there are no devices connected (sends
diff --git a/src/main.c b/src/main.c
index c6632a4..3c1209f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -68,6 +68,7 @@ int no_preflight = 0;
// Global state for main.c
static int verbose = 0;
static int background = 0;
+static int obsolete_foreground = 0;
static int drop_privileges = 0;
static const char *drop_user = NULL;
static int opt_disable_hotplug = 0;
@@ -517,7 +518,7 @@ static void usage()
printf(" -u, --udev\t\tRun in udev operation mode (implies -n, -b and -z).\n");
#endif
#ifdef HAVE_SYSTEMD
- printf(" -s, --systemd\t\tRun in systemd operation mode (implies -z and -f).\n");
+ printf(" -s, --systemd\t\tRun in systemd operation mode (implies -z).\n");
#endif
printf(" -C, --config-dir PATH\tSpecify different configuration directory.\n");
printf(" -S, --socket ADDR:PORT | PATH Specify source ADDR and PORT or a UNIX\n");
@@ -541,6 +542,7 @@ static void parse_opts(int argc, char **argv)
static struct option longopts[] = {
{"help", no_argument, NULL, 'h'},
{"background", no_argument, NULL, 'b'},
+ {"foreground", no_argument, NULL, 'f'},
{"verbose", no_argument, NULL, 'v'},
{"user", required_argument, NULL, 'U'},
{"disable-hotplug", no_argument, NULL, 'n'},
@@ -564,11 +566,11 @@ static void parse_opts(int argc, char **argv)
int c;
#ifdef HAVE_SYSTEMD
- const char* opts_spec = "hbvVuU:xXsnzl:pC:S:P:";
+ const char* opts_spec = "hbfvVuU:xXsnzl:pC:S:P:";
#elif HAVE_UDEV
- const char* opts_spec = "hbvVuU:xXnzl:pC:S:P:";
+ const char* opts_spec = "hbfvVuU:xXnzl:pC:S:P:";
#else
- const char* opts_spec = "hbvVU:xXnzl:pC:S:P:";
+ const char* opts_spec = "hbfvVU:xXnzl:pC:S:P:";
#endif
while (1) {
@@ -584,6 +586,9 @@ static void parse_opts(int argc, char **argv)
case 'b':
background = 1;
break;
+ case 'f':
+ obsolete_foreground = 1;
+ break;
case 'v':
++verbose;
break;
@@ -699,6 +704,9 @@ int main(int argc, char *argv[])
log_level = verbose;
usbmuxd_log(LL_NOTICE, "usbmuxd v%s starting up", PACKAGE_VERSION);
+ if (obsolete_foreground) {
+ usbmuxd_log(LL_WARNING, "-f is obsolete and ignored; running in the foreground is the default (use -b to run in the background)");
+ }
should_exit = 0;
should_discover = 0;