summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/busctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-28 16:38:47 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-28 20:29:43 +0100
commit5c3026927de9dfa60ad6ae8326fef5d7824e723e (patch)
tree6e31a4fea775b3eb5f1afa5cfe484cef97fc9820 /src/libsystemd/sd-bus/busctl.c
parent4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f (diff)
sd-bus: rename sd_bus_get_owner_id() → sd_bus_get_bus_id()
The ID returned really doesn't identify the owner, but the bus instance, hence fix this misnaming. Also, update "busctl status" to show the ID in its output.
Diffstat (limited to 'src/libsystemd/sd-bus/busctl.c')
-rw-r--r--src/libsystemd/sd-bus/busctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index 229a1cf9a2..f75a9dcbd3 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -1177,11 +1177,16 @@ static int status(sd_bus *bus, char *argv[]) {
_SD_BUS_CREDS_ALL);
} else {
const char *scope;
+ sd_id128_t bus_id;
r = sd_bus_get_scope(bus, &scope);
if (r >= 0)
printf("Scope=%s%s%s\n", ansi_highlight(), scope, ansi_highlight_off());
+ r = sd_bus_get_bus_id(bus, &bus_id);
+ if (r >= 0)
+ printf("BusID=%s" SD_ID128_FORMAT_STR "%s\n", ansi_highlight(), SD_ID128_FORMAT_VAL(bus_id), ansi_highlight_off());
+
r = sd_bus_get_owner_creds(
bus,
(arg_augment_creds ? SD_BUS_CREDS_AUGMENT : 0) | _SD_BUS_CREDS_ALL,