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.
This commit is contained in:
Frantisek Sumsal
2023-11-25 21:36:10 +01:00
parent a986de6899
commit 538291b0d8

View 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) },