diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2013-01-23 13:14:17 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2013-06-20 13:51:13 +0100 |
commit | 46cc82e1bbb84e6f9a1dde962c57079f39eca079 (patch) | |
tree | d4bc8591fca685ca74784e4dfa0c4e4eb3080db3 /bus/main.c | |
parent | 3a43d4aef2ddb2d5cdfb5c411b01840289203d49 (diff) | |
download | dbus-46cc82e1bbb84e6f9a1dde962c57079f39eca079.tar.gz |
Let dbus-daemon not print unavailable options on windows.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=42441
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'bus/main.c')
-rw-r--r-- | bus/main.c | 28 |
1 files changed, 23 insertions, 5 deletions
@@ -131,7 +131,23 @@ signal_handler (int sig) static void usage (void) { - fprintf (stderr, DBUS_DAEMON_NAME " [--version] [--session] [--system] [--config-file=FILE] [--print-address[=DESCRIPTOR]] [--print-pid[=DESCRIPTOR]] [--fork] [--nofork] [--introspect] [--address=ADDRESS] [--systemd-activation] [--nopidfile]\n"); + fprintf (stderr, + DBUS_DAEMON_NAME + " [--version]" + " [--session]" + " [--system]" + " [--config-file=FILE]" + " [--print-address[=DESCRIPTOR]]" + " [--print-pid[=DESCRIPTOR]]" + " [--introspect]" + " [--address=ADDRESS]" + " [--nopidfile]" +#ifdef DBUS_UNIX + " [--fork]" + " [--nofork]" + " [--systemd-activation]" +#endif + "\n"); exit (1); } @@ -400,6 +416,7 @@ main (int argc, char **argv) { introspect (); } +#ifdef DBUS_UNIX else if (strcmp (arg, "--nofork") == 0) { flags &= ~BUS_CONTEXT_FLAG_FORK_ALWAYS; @@ -410,14 +427,15 @@ main (int argc, char **argv) flags &= ~BUS_CONTEXT_FLAG_FORK_NEVER; flags |= BUS_CONTEXT_FLAG_FORK_ALWAYS; } - else if (strcmp (arg, "--nopidfile") == 0) - { - flags &= ~BUS_CONTEXT_FLAG_WRITE_PID_FILE; - } else if (strcmp (arg, "--systemd-activation") == 0) { flags |= BUS_CONTEXT_FLAG_SYSTEMD_ACTIVATION; } +#endif + else if (strcmp (arg, "--nopidfile") == 0) + { + flags &= ~BUS_CONTEXT_FLAG_WRITE_PID_FILE; + } else if (strcmp (arg, "--system") == 0) { check_two_config_files (&config_file, "system"); |