diff --git a/man/systemd-cgls.xml b/man/systemd-cgls.xml index 5280992c8c..60cf6fa41a 100644 --- a/man/systemd-cgls.xml +++ b/man/systemd-cgls.xml @@ -114,22 +114,23 @@ + - Controls whether to include information about extended attributes of the listed - control groups in the output. With the long option, expects a boolean value. Defaults to no. + control groups in the output. With the long option only, optionally accepts a boolean value. Defaults + to no. + - Controls whether to include the numeric ID of the listed control groups in the - output. With the long option, expects a boolean value. Defaults to no. + output. With the long option only, optionally accepts a boolean value. Defaults to no. diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c index 1c43543a90..60d8e77012 100644 --- a/src/cgls/cgls.c +++ b/src/cgls/cgls.c @@ -112,8 +112,9 @@ static int parse_argv(int argc, char *argv[]) { return log_oom(); break; - OPTION_FULL(OPTION_OPTIONAL_ARG, 'x', "xattr", "BOOL", - "Show cgroup extended attributes"): + OPTION_LONG_FLAGS(OPTION_OPTIONAL_ARG, "xattr", "BOOL", + "Show cgroup extended attributes"): {} + OPTION_SHORT('x', NULL, "Same as --xattr=true"): if (arg) { r = parse_boolean(arg); if (r < 0) @@ -124,8 +125,9 @@ static int parse_argv(int argc, char *argv[]) { SET_FLAG(arg_output_flags, OUTPUT_CGROUP_XATTRS, r); break; - OPTION_FULL(OPTION_OPTIONAL_ARG, 'c', "cgroup-id", "BOOL", - "Show cgroup ID"): + OPTION_LONG_FLAGS(OPTION_OPTIONAL_ARG, "cgroup-id", "BOOL", + "Show cgroup ID"): {} + OPTION_SHORT('c', NULL, "Same as --cgroup-id=true"): if (arg) { r = parse_boolean(arg); if (r < 0)