]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: include unit ID in the property map
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 25 Nov 2023 20:36:10 +0000 (21:36 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 25 Nov 2023 20:36:10 +0000 (21:36 +0100)
Otherwise we get a not very nice message when trying to display a
non-existent man page:

~# systemctl cat test.service
[Unit]
Description=Hello
[Service]
ExecStart=true
~# systemctl help test.service
Documentation for (null) not known.

src/systemctl/systemctl-show.c

index 4ec2a7c94130a9a0f9fc203d4285563a5f17886b..963ba69ab6e339ee8e1df7d90d8857d2879daf14 100644 (file)
@@ -1996,6 +1996,7 @@ static int show_one(
                 bool *ellipsized) {
 
         static const struct bus_properties_map property_map[] = {
+                { "Id",                             "s",               NULL,           offsetof(UnitStatusInfo, id)                                },
                 { "LoadState",                      "s",               NULL,           offsetof(UnitStatusInfo, load_state)                        },
                 { "ActiveState",                    "s",               NULL,           offsetof(UnitStatusInfo, active_state)                      },
                 { "FreezerState",                   "s",               NULL,           offsetof(UnitStatusInfo, freezer_state)                     },