]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: do not show unit properties with --all
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Nov 2022 12:10:56 +0000 (21:10 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 14 Nov 2022 09:00:02 +0000 (10:00 +0100)
Fixes a bug introduced by a6e334649d4bdff0c6f664e98666b2223aa21a8b.

Fixes #25343.

src/systemctl/systemctl-show.c

index 8d3db98c0a5966e4659f0f77b86597b0d22d4acb..24c7d564b8bba62a2c680cdde5ce084f7c682e82 100644 (file)
@@ -2207,9 +2207,10 @@ int verb_show(int argc, char *argv[], void *userdata) {
 
                 if (!arg_states && !arg_types) {
                         if (show_mode == SYSTEMCTL_SHOW_PROPERTIES)
-                                r = show_one(bus, "/org/freedesktop/systemd1", NULL, show_mode, &new_line, &ellipsized);
-                        else
-                                r = show_system_status(bus);
+                                /* systemctl show --all → show properties of the manager */
+                                return show_one(bus, "/org/freedesktop/systemd1", NULL, show_mode, &new_line, &ellipsized);
+
+                        r = show_system_status(bus);
                         if (r < 0)
                                 return r;