Skip to content

Commit

Permalink
systemctl: include unit ID in the property map
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mrc0mmand committed Nov 25, 2023
1 parent a986de6 commit 538291b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/systemctl/systemctl-show.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
Expand Down

0 comments on commit 538291b

Please sign in to comment.