summaryrefslogtreecommitdiffstats
path: root/src/core/unit-printf.c
diff options
context:
space:
mode:
authorDavide Cavalca <davide125@tiscali.it>2018-10-13 10:26:48 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-10-13 10:26:48 +0200
commitb75f0c69b3c80ab1d80f907de96f1c1a444c171a (patch)
treec2320b5e58c405c571b9ddd565d52d134501cc6c /src/core/unit-printf.c
parentMerge pull request #10366 from poettering/in-set-fixes (diff)
downloadsystemd-b75f0c69b3c80ab1d80f907de96f1c1a444c171a.tar.xz
systemd-b75f0c69b3c80ab1d80f907de96f1c1a444c171a.zip
shared: add %g, %G specifiers for group / gid (#10368)
Diffstat (limited to 'src/core/unit-printf.c')
-rw-r--r--src/core/unit-printf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c
index 046e937e92..547d9d8852 100644
--- a/src/core/unit-printf.c
+++ b/src/core/unit-printf.c
@@ -196,6 +196,8 @@ int unit_name_printf(Unit *u, const char* format, char **ret) {
{ 'p', specifier_prefix, NULL },
{ 'i', specifier_string, u->instance },
+ { 'g', specifier_group_name, NULL },
+ { 'G', specifier_group_id, NULL },
{ 'U', specifier_user_id, NULL },
{ 'u', specifier_user_name, NULL },
@@ -264,6 +266,8 @@ int unit_full_printf(Unit *u, const char *format, char **ret) {
{ 'T', specifier_tmp_dir, NULL },
{ 'V', specifier_var_tmp_dir, NULL },
+ { 'g', specifier_group_name, NULL },
+ { 'G', specifier_group_id, NULL },
{ 'U', specifier_user_id, NULL },
{ 'u', specifier_user_name, NULL },
{ 'h', specifier_user_home, NULL },