summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-dump.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-01-22 18:43:03 +0100
committerLennart Poettering <lennart@poettering.net>2014-01-22 18:51:49 +0100
commit14008e4e9cc6b51d68cd07ed091f788239d92856 (patch)
tree29d0706be3db7f8d0f3703383864e88d61e1a87b /src/libsystemd/sd-bus/bus-dump.c
parent2578d51ebd40ae0a8c6343164334358384dd55f7 (diff)
busctl: include connection name in busctl output
Diffstat (limited to 'src/libsystemd/sd-bus/bus-dump.c')
-rw-r--r--src/libsystemd/sd-bus/bus-dump.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c
index f1d00a952b..a2b6358215 100644
--- a/src/libsystemd/sd-bus/bus-dump.c
+++ b/src/libsystemd/sd-bus/bus-dump.c
@@ -340,12 +340,16 @@ int bus_creds_dump(sd_bus_creds *c, FILE *f) {
fprintf(f, " Comm=%s", c->comm);
if (c->mask & SD_BUS_CREDS_TID_COMM)
fprintf(f, " TIDComm=%s", c->tid_comm);
+
+ if (c->mask & (SD_BUS_CREDS_EXE|SD_BUS_CREDS_COMM|SD_BUS_CREDS_TID_COMM))
+ fputs("\n", f);
+
if (c->mask & SD_BUS_CREDS_SELINUX_CONTEXT)
fprintf(f, " Label=%s", c->label);
if (c->mask & SD_BUS_CREDS_CONNECTION_NAME)
fprintf(f, " ConnectionName=%s", c->conn_name);
- if (c->mask & (SD_BUS_CREDS_EXE|SD_BUS_CREDS_COMM|SD_BUS_CREDS_TID_COMM|SD_BUS_CREDS_SELINUX_CONTEXT|SD_BUS_CREDS_CONNECTION_NAME))
+ if (c->mask & (SD_BUS_CREDS_SELINUX_CONTEXT|SD_BUS_CREDS_CONNECTION_NAME))
fputs("\n", f);
if (sd_bus_creds_get_cmdline(c, &cmdline) >= 0) {