From 538291b0d8dd157c66d9c340a18fceb57e8424d8 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Sat, 25 Nov 2023 21:36:10 +0100 Subject: [PATCH] systemctl: include unit ID in the property map 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/systemctl/systemctl-show.c b/src/systemctl/systemctl-show.c index 4ec2a7c..963ba69 100644 --- a/src/systemctl/systemctl-show.c +++ b/src/systemctl/systemctl-show.c @@ -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) }, -- 2.7.4