From: Paweł Marciniak Date: Sat, 26 Jun 2021 15:50:16 +0000 (+0200) Subject: core: add combined status unit format X-Git-Tag: v249-rc3~13^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=580e198a50449e892aa110c81d74f277d2ae8fa0;p=thirdparty%2Fsystemd.git core: add combined status unit format [zjs: actual implementation is stripped out and will be added in subsequent commits.] --- diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index 2851bae31e7..9ad309a7e3d 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -257,10 +257,12 @@ StatusUnitFormat= - Takes either or as the value. If - , the system manager will use unit names in status messages, instead of the - longer and more informative descriptions set with Description=, see - systemd.unit5. + Takes , or + as the value. If , the system manager will use unit + names in status messages, instead of the longer and more informative descriptions set with + Description=, see + systemd.unit5. If + , the system manager will use unit names and description in status messages. diff --git a/man/systemd.xml b/man/systemd.xml index 5f1642ee9de..cd50cd42658 100644 --- a/man/systemd.xml +++ b/man/systemd.xml @@ -840,9 +840,11 @@ systemd.status_unit_format= - Takes either or as the value. If - , the system manager will use unit names in status messages. If specified, - overrides the system manager configuration file option , see + Takes , or + as the value. If , the system manager will use unit + names in status messages. If , the system manager will use unit names and + description in status messages. When specified, overrides the system manager configuration file + option , see systemd-system.conf5. diff --git a/meson_options.txt b/meson_options.txt index 5048de755d9..163c8df87db 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -200,7 +200,7 @@ option('default-net-naming-scheme', type : 'combo', choices : ['latest', 'v238', 'v239', 'v240'], description : 'default net.naming-scheme= value') option('status-unit-format-default', type : 'combo', - choices : ['description', 'name'], + choices : ['description', 'name', 'combined'], description : 'use unit name or description in messages by default') option('time-epoch', type : 'integer', value : '-1', description : 'time epoch for time clients') diff --git a/src/core/show-status.c b/src/core/show-status.c index a74423cb85d..df254299389 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -123,6 +123,7 @@ int status_printf(const char *status, ShowStatusFlags flags, const char *format, static const char* const status_unit_format_table[_STATUS_UNIT_FORMAT_MAX] = { [STATUS_UNIT_FORMAT_NAME] = "name", [STATUS_UNIT_FORMAT_DESCRIPTION] = "description", + [STATUS_UNIT_FORMAT_COMBINED] = "combined", }; DEFINE_STRING_TABLE_LOOKUP(status_unit_format, StatusUnitFormat); diff --git a/src/core/show-status.h b/src/core/show-status.h index dfcf5f4103e..f441223dff6 100644 --- a/src/core/show-status.h +++ b/src/core/show-status.h @@ -25,6 +25,7 @@ typedef enum ShowStatusFlags { typedef enum StatusUnitFormat { STATUS_UNIT_FORMAT_NAME, STATUS_UNIT_FORMAT_DESCRIPTION, + STATUS_UNIT_FORMAT_COMBINED, _STATUS_UNIT_FORMAT_MAX, _STATUS_UNIT_FORMAT_INVALID = -EINVAL, } StatusUnitFormat;