From: Lennart Poettering Date: Tue, 2 Dec 2014 11:58:13 +0000 (+0100) Subject: busctl: fix 'command line' style output of properties X-Git-Tag: v218~157 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=1ed24c6170c95fbe61fed919db2e98cf0d1d568e busctl: fix 'command line' style output of properties --- diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c index 1ba4e8ada..dd6ae865b 100644 --- a/src/libsystemd/sd-bus/busctl.c +++ b/src/libsystemd/sd-bus/busctl.c @@ -538,7 +538,7 @@ static int format_cmdline(sd_bus_message *m, FILE *f, bool needs_space) { fprintf(f, "%s", contents); } - r = format_cmdline(m, f, true); + r = format_cmdline(m, f, needs_space || IN_SET(type, SD_BUS_TYPE_ARRAY, SD_BUS_TYPE_VARIANT)); if (r < 0) return r; @@ -614,6 +614,7 @@ static int format_cmdline(sd_bus_message *m, FILE *f, bool needs_space) { assert_not_reached("Unknown basic type."); } + needs_space = true; } }