diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-01-30 14:13:04 +0000 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-31 13:14:02 +0900 |
commit | bc556335b1c568c98688cc1f586b5f753fcddac6 (patch) | |
tree | 2f9336fb6ea885d672e8c0e23300a448a554ce02 /src/partition | |
parent | 16455ee2b1853238cf0e936735ff92e690a20253 (diff) | |
download | systemd-bc556335b1c568c98688cc1f586b5f753fcddac6.tar.gz |
tree-wide: Drop custom formatting for print() help messages
I think this formatting was originally used because it simplified
adding new options to the help messages. However, these days, most
tools their help message end with "\nSee the %s for details.\n" so
the final line almost never has to be edited which eliminates the
benefit of the custom formatting used for printf() help messages.
Let's make things more consistent and use the same formatting for
printf() help messages that we use everywhere else.
Prompted by https://github.com/systemd/systemd/pull/18355#discussion_r567241580
Diffstat (limited to 'src/partition')
-rw-r--r-- | src/partition/growfs.c | 7 | ||||
-rw-r--r-- | src/partition/repart.c | 10 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/partition/growfs.c b/src/partition/growfs.c index 9406ae8373..367644e3c9 100644 --- a/src/partition/growfs.c +++ b/src/partition/growfs.c @@ -140,10 +140,9 @@ static int help(void) { " -h --help Show this help and exit\n" " --version Print version string and exit\n" " -n --dry-run Just print what would be done\n" - "\nSee the %s for details.\n" - , program_invocation_short_name - , link - ); + "\nSee the %s for details.\n", + program_invocation_short_name, + link); return 0; } diff --git a/src/partition/repart.c b/src/partition/repart.c index 3d25fdb34e..3004e59f9c 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3497,11 +3497,11 @@ static int help(void) { " --size=BYTES Grow loopback file to specified size\n" " --json=pretty|short|off\n" " Generate JSON output\n" - "\nSee the %s for details.\n" - , program_invocation_short_name - , ansi_highlight(), ansi_normal() - , link - ); + "\nSee the %s for details.\n", + program_invocation_short_name, + ansi_highlight(), + ansi_normal(), + link); return 0; } |