summaryrefslogtreecommitdiff
path: root/src/bus-proxyd
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-21 10:26:55 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-21 18:26:47 -0500
commitcc4e8b6f70a42b7bf8f6761006ab95fcd195a3be (patch)
tree18444fe90a7997913f99f6b3f273215e1367e454 /src/bus-proxyd
parentdad5f697ddecf91c2ed6604731d907c0a38d0c5f (diff)
bus-proxyd: show address nicely in --help
Diffstat (limited to 'src/bus-proxyd')
-rw-r--r--src/bus-proxyd/bus-proxyd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c
index 91472d93f1..059f3f6d1a 100644
--- a/src/bus-proxyd/bus-proxyd.c
+++ b/src/bus-proxyd/bus-proxyd.c
@@ -41,12 +41,16 @@
#include "build.h"
#include "strv.h"
+#define UNIX_BUS_PATH "unix:path=/run/dbus/system_bus_socket"
+#define KERNEL_BUS_PATH "kernel:path=/dev/kdbus/0-system/bus"
+
#ifdef ENABLE_KDBUS
-static const char *arg_address = "kernel:path=/dev/kdbus/0-system/bus;unix:path=/run/dbus/system_bus_socket";
+# define DEFAULT_BUS_PATH KERNEL_BUS_PATH ";" UNIX_BUS_PATH
#else
-static const char *arg_address = "unix:path=/run/dbus/system_bus_socket";
+# define DEFAULT_BUS_PATH UNIX_BUS_PATH
#endif
+static const char *arg_address = DEFAULT_BUS_PATH;
static char *arg_command_line_buffer = NULL;
static int help(void) {
@@ -55,7 +59,8 @@ static int help(void) {
"Connect STDIO or a socket to a given bus address.\n\n"
" -h --help Show this help\n"
" --version Show package version\n"
- " --address=ADDRESS Connect to bus specified by address\n",
+ " --address=ADDRESS Connect to the bus specified by ADDRESS\n"
+ " (default: " DEFAULT_BUS_PATH ")\n",
program_invocation_short_name);
return 0;