Skip to content

Commit 400bb7a

Browse files
mrc0mmandkeszybz
authored andcommitted
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. (cherry picked from commit 538291b) (cherry picked from commit 5030e49)
1 parent d8cc2bf commit 400bb7a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/systemctl/systemctl-show.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1925,6 +1925,7 @@ static int show_one(
19251925
bool *ellipsized) {
19261926

19271927
static const struct bus_properties_map property_map[] = {
1928+
{ "Id", "s", NULL, offsetof(UnitStatusInfo, id) },
19281929
{ "LoadState", "s", NULL, offsetof(UnitStatusInfo, load_state) },
19291930
{ "ActiveState", "s", NULL, offsetof(UnitStatusInfo, active_state) },
19301931
{ "FreezerState", "s", NULL, offsetof(UnitStatusInfo, freezer_state) },

0 commit comments

Comments
 (0)