From: Kamalesh Babulal Date: Wed, 11 Jan 2023 17:39:55 +0000 (-0700) Subject: tools/cgxset: fix help/usage formatting X-Git-Tag: v3.1.0~245 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44a90415da4ee96bee2d7b51673cd53fe54824a1;p=thirdparty%2Flibcgroup.git 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 ] ... or: cgxset --copy-from ... 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 Define parameter to set --copy-from Control group whose parameters will be copied After: ------ Usage: cgxset [-r ] ... or: cgxset --copy-from ... 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 Define parameter to set --copy-from Control group whose parameters will be copied Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- diff --git a/src/tools/cgxset.c b/src/tools/cgxset.c index 5420e5d5..583902ee 100644 --- a/src/tools/cgxset.c +++ b/src/tools/cgxset.c @@ -75,12 +75,12 @@ static void usage(int status, const char *program_name) info("Usage: %s [-r ] ...\n", program_name); info(" or: %s --copy-from ...\n", program_name); info("Set the parameters of given cgroup(s)\n"); - info(" -1, --v1 Provided parameters are in v1 format\n"); - info(" -2, --v2 Provided parameters are in v2 format\n"); - info(" -i, --ignore-unmappable Do not return an error for "); + info(" -1, --v1 Provided parameters are in v1 format\n"); + info(" -2, --v2 Provided parameters are in v2 format\n"); + info(" -i, --ignore-unmappable Do not return an error for "); info("settings that cannot be converted\n"); - info(" -r, --variable Define parameter to set\n"); - info(" --copy-from Control group whose "); + info(" -r, --variable Define parameter to set\n"); + info(" --copy-from Control group whose "); info("parameters will be copied\n"); } #endif /* !UNIT_TEST */