]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tools/cgxset: fix help/usage formatting
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Wed, 11 Jan 2023 17:40:49 +0000 (10:40 -0700)
committerTom Hromatka <tom.hromatka@oracle.com>
Wed, 11 Jan 2023 17:40:52 +0000 (10:40 -0700)
commit9f1ecd398a6715ba618d345eecf08c70101ee843
tree76036eb20b241439534fe62cfcb5dc06e0b6f874
parent3abcf2b280288d653a7f2927636b87f8b80566c5
tools/cgxset: fix help/usage formatting

The help/usage output is misaligned, which is a mix of tabs and spaces.
Fix it by using only spaces for the alignment, so that we have a visual
representation of output in the code too, instead of having unaligned
info()'s needing to calculate the tabs stops always.

Before:
-------
Usage: cgxset [-r <name=value>] <cgroup_path> ...
   or: cgxset --copy-from <source_cgroup_path> <cgroup_path> ...
Set the parameters of given cgroup(s)
  -1, --v1                      Provided parameters are in v1 format
  -2, --v2                      Provided parameters are in v2 format
  -i, --ignore-unmappable       Do not return an error for settings that cannot be converted
  -r, --variable <name>                 Define parameter to set
  --copy-from <source_cgroup_path>      Control group whose parameters will be copied

After:
------
Usage: cgxset [-r <name=value>] <cgroup_path> ...
   or: cgxset --copy-from <source_cgroup_path> <cgroup_path> ...
Set the parameters of given cgroup(s)
  -1, --v1                                Provided parameters are in v1 format
  -2, --v2                                Provided parameters are in v2 format
  -i, --ignore-unmappable                 Do not return an error for settings that cannot be converted
  -r, --variable <name>                   Define parameter to set
  --copy-from <source_cgroup_path>        Control group whose parameters will be copied

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit 44a90415da4ee96bee2d7b51673cd53fe54824a1)
src/tools/cgxset.c