naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
2aacef
From c2317e2a2be2dd39266b82712ec9569a86f7fde3 Mon Sep 17 00:00:00 2001
2aacef
From: Yu Watanabe <watanabe.yu+github@gmail.com>
2aacef
Date: Sun, 13 Nov 2022 21:10:56 +0900
2aacef
Subject: [PATCH] systemctl: do not show unit properties with --all
2aacef
2aacef
Fixes a bug introduced by a6e334649d4bdff0c6f664e98666b2223aa21a8b.
2aacef
2aacef
Fixes #25343.
2aacef
2aacef
(cherry picked from commit 0b51a1c8c4c77f98a8c234cd2c7a7849329be027)
2aacef
2aacef
Related: #2138081
2aacef
---
2aacef
 src/systemctl/systemctl-show.c | 7 ++++---
2aacef
 1 file changed, 4 insertions(+), 3 deletions(-)
2aacef
2aacef
diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c
2aacef
index 8d3db98c0a..24c7d564b8 100644
2aacef
--- a/src/systemctl/systemctl-show.c
2aacef
+++ b/src/systemctl/systemctl-show.c
2aacef
@@ -2207,9 +2207,10 @@ int verb_show(int argc, char *argv[], void *userdata) {
2aacef
 
2aacef
                 if (!arg_states && !arg_types) {
2aacef
                         if (show_mode == SYSTEMCTL_SHOW_PROPERTIES)
2aacef
-                                r = show_one(bus, "/org/freedesktop/systemd1", NULL, show_mode, &new_line, &ellipsized);
2aacef
-                        else
2aacef
-                                r = show_system_status(bus);
2aacef
+                                /* systemctl show --all → show properties of the manager */
2aacef
+                                return show_one(bus, "/org/freedesktop/systemd1", NULL, show_mode, &new_line, &ellipsized);
2aacef
+
2aacef
+                        r = show_system_status(bus);
2aacef
                         if (r < 0)
2aacef
                                 return r;
2aacef