diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-01-30 15:13:04 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-31 05:14:02 +0100 |
commit | bc556335b1c568c98688cc1f586b5f753fcddac6 (patch) | |
tree | 2f9336fb6ea885d672e8c0e23300a448a554ce02 /src/resolve | |
parent | man: fix small issue in AllowedMemoryNodes description (diff) | |
download | systemd-bc556335b1c568c98688cc1f586b5f753fcddac6.tar.xz systemd-bc556335b1c568c98688cc1f586b5f753fcddac6.zip |
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/resolve')
-rw-r--r-- | src/resolve/resolvconf-compat.c | 7 | ||||
-rw-r--r-- | src/resolve/resolvectl.c | 26 |
2 files changed, 15 insertions, 18 deletions
diff --git a/src/resolve/resolvconf-compat.c b/src/resolve/resolvconf-compat.c index 5bc936faa7..b3f1e12fa6 100644 --- a/src/resolve/resolvconf-compat.c +++ b/src/resolve/resolvconf-compat.c @@ -43,10 +43,9 @@ static int resolvconf_help(void) { "implementations are not supported and will cause the invocation to fail: -u,\n" "-I, -i, -l, -R, -r, -v, -V, --enable-updates, --disable-updates,\n" "--updates-are-enabled.\n" - "\nSee the %2$s for details.\n" - , program_invocation_short_name - , link - ); + "\nSee the %2$s for details.\n", + program_invocation_short_name, + link); return 0; } diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index b479335769..b1779a6418 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -2568,12 +2568,11 @@ static int compat_help(void) { " --set-dnssec=MODE Set per-interface DNSSEC mode\n" " --set-nta=DOMAIN Set per-interface DNSSEC NTA\n" " --revert Revert per-interface configuration\n" - "\nSee the %4$s for details.\n" - , program_invocation_short_name - , ansi_highlight() - , ansi_normal() - , link - ); + "\nSee the %4$s for details.\n", + program_invocation_short_name, + ansi_highlight(), + ansi_normal(), + link); return 0; } @@ -2627,14 +2626,13 @@ static int native_help(void) { " (default: yes)\n" " --raw[=payload|packet] Dump the answer as binary data\n" " --legend=BOOL Print headers and additional info (default: yes)\n" - "\nSee the %s for details.\n" - , program_invocation_short_name - , ansi_highlight() - , ansi_normal() - , ansi_highlight() - , ansi_normal() - , link - ); + "\nSee the %s for details.\n", + program_invocation_short_name, + ansi_highlight(), + ansi_normal(), + ansi_highlight(), + ansi_normal(), + link); return 0; } |