diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-16 14:34:36 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-16 14:34:36 +0200 |
commit | e59679246ef6faf4348e2055db80baa8dec380e5 (patch) | |
tree | 47220e36c65d9ecf706cb8fdc0b9b652f1fef421 /src/bus-proxyd | |
parent | ab5838fce7408061514b6322a39b1b5e27cc19b1 (diff) | |
parent | d4d00020d6ad855d65d31020fefa5003e1bb477f (diff) |
Merge pull request #932 from kaysievers/bus
sd-bus: do not connect to dbus-1 socket when kdbus is available
Diffstat (limited to 'src/bus-proxyd')
-rw-r--r-- | src/bus-proxyd/bus-proxyd.c | 7 | ||||
-rw-r--r-- | src/bus-proxyd/stdio-bridge.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/bus-proxyd/bus-proxyd.c b/src/bus-proxyd/bus-proxyd.c index 3cc3b33ae7..6e07aea94e 100644 --- a/src/bus-proxyd/bus-proxyd.c +++ b/src/bus-proxyd/bus-proxyd.c @@ -177,8 +177,9 @@ static int help(void) { " --configuration=PATH Configuration file or directory\n" " --machine=MACHINE Connect to specified machine\n" " --address=ADDRESS Connect to the bus specified by ADDRESS\n" - " (default: " DEFAULT_SYSTEM_BUS_ADDRESS ")\n", - program_invocation_short_name); + " (default: %s)\n", + program_invocation_short_name, + is_kdbus_available() ? KERNEL_SYSTEM_BUS_ADDRESS : UNIX_SYSTEM_BUS_ADDRESS); return 0; } @@ -262,7 +263,7 @@ static int parse_argv(int argc, char *argv[]) { } if (!arg_address) { - arg_address = strdup(DEFAULT_SYSTEM_BUS_ADDRESS); + arg_address = strdup(is_kdbus_available() ? KERNEL_SYSTEM_BUS_ADDRESS : UNIX_SYSTEM_BUS_ADDRESS); if (!arg_address) return log_oom(); } diff --git a/src/bus-proxyd/stdio-bridge.c b/src/bus-proxyd/stdio-bridge.c index f275f6705f..c5dac396d3 100644 --- a/src/bus-proxyd/stdio-bridge.c +++ b/src/bus-proxyd/stdio-bridge.c @@ -50,8 +50,9 @@ static int help(void) { " --version Show package version\n" " --machine=MACHINE Connect to specified machine\n" " --address=ADDRESS Connect to the bus specified by ADDRESS\n" - " (default: " DEFAULT_SYSTEM_BUS_ADDRESS ")\n", - program_invocation_short_name); + " (default: %s)\n", + program_invocation_short_name, + is_kdbus_available() ? KERNEL_SYSTEM_BUS_ADDRESS : UNIX_SYSTEM_BUS_ADDRESS); return 0; } @@ -137,7 +138,7 @@ static int parse_argv(int argc, char *argv[]) { } if (!arg_address) { - arg_address = strdup(DEFAULT_SYSTEM_BUS_ADDRESS); + arg_address = strdup(is_kdbus_available() ? KERNEL_SYSTEM_BUS_ADDRESS : UNIX_SYSTEM_BUS_ADDRESS); if (!arg_address) return log_oom(); } |