systemctl: update 'show' format for path units
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 1 Feb 2018 06:22:00 +0000 (15:22 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 5 Feb 2018 06:27:53 +0000 (15:27 +0900)
Before this.
```
$ systemctl show cups.path | grep ^Path
PathExistsGlob=/var/spool/cups/d*
$ systemctl show --property PathExistsGlob cups.path
$ systemctl show --property Paths cups.path
PathExistsGlob=/var/spool/cups/d*
```

After this.
```
$ systemctl show cups.path | grep ^Path
Paths=/var/spool/cups/d* (PathExistsGlob)
$ systemctl show --property Paths cups.path
Paths=/var/spool/cups/d* (PathExistsGlob)
```

src/systemctl/systemctl.c

index dea7d3a..a9bcc49 100644 (file)
@@ -4889,7 +4889,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte
                                 return bus_log_parse_error(r);
 
                         while ((r = sd_bus_message_read(m, "(ss)", &type, &path)) > 0)
-                                print_prop(type, "%s", path);
+                                print_prop(name, "%s (%s)", path, type);
                         if (r < 0)
                                 return bus_log_parse_error(r);