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
This commit is contained in:
Daan De Meyer 2021-01-30 14:13:04 +00:00 committed by Yu Watanabe
parent 16455ee2b1
commit bc556335b1
78 changed files with 335 additions and 370 deletions

View file

@ -12,8 +12,8 @@ static void help(void) {
"Report whether we are connected to an external power source.\n\n"
" -h --help Show this help\n"
" --version Show package version\n"
" -v --verbose Show state as text\n"
, program_invocation_short_name);
" -v --verbose Show state as text\n",
program_invocation_short_name);
}
static int parse_argv(int argc, char *argv[]) {

View file

@ -342,11 +342,11 @@ static int help(void) {
" --fdname=NAME[:NAME...] Specify names for file descriptors\n"
" --inetd Enable inetd file descriptor passing protocol\n"
"\nNote: file descriptors from sd_listen_fds() will be passed through.\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;
}

View file

@ -2221,13 +2221,12 @@ static int help(int argc, char *argv[], void *userdata) {
" --generators[=BOOL] Do [not] run unit generators (requires privileges)\n"
" --iterations=N Show the specified number of iterations\n"
" --base-time=TIMESTAMP Calculate calendar times relative to specified time\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, ansi_highlight()
, ansi_normal()
, dot_link
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
ansi_highlight(),
ansi_normal(),
dot_link,
link);
/* When updating this list, including descriptions, apply changes to
* shell-completion/bash/systemd-analyze and shell-completion/zsh/_systemd-analyze too. */

View file

@ -44,10 +44,9 @@ static int help(void) {
" --accept-cached Accept cached passwords\n"
" --multiple List multiple passwords if available\n"
" --no-output Do not print password to standard output\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;
}

View file

@ -33,12 +33,12 @@ static int help(void) {
"\n%sSave and restore backlight brightness at shutdown and boot.%s\n\n"
" save Save current brightness\n"
" load Set brightness to be the previously saved value\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, program_invocation_short_name
, ansi_highlight(), ansi_normal()
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
program_invocation_short_name,
ansi_highlight(),
ansi_normal(),
link);
return 0;
}

View file

@ -118,10 +118,9 @@ static int help(void) {
" --cat-config Show configuration files\n"
" --no-pager Do not pipe output into a pager\n"
" --unregister Unregister all existing entries\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;
}

View file

@ -42,12 +42,11 @@ static int help(int argc, char *argv[], void *userdata) {
" -h --help Show this help\n"
" --version Print version\n"
" --path=PATH Path to the $BOOT partition (may be used multiple times)\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;
}

View file

@ -27,12 +27,11 @@ static int help(void) {
"\n%sVerify system operational state.%s\n\n"
" -h --help Show this help\n"
" --version Print version\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;
}

View file

@ -1043,12 +1043,13 @@ static int help(int argc, char *argv[], void *userdata) {
" --no-pager Do not pipe output into a pager\n"
" --graceful Don't fail when the ESP cannot be found or EFI\n"
" variables cannot be written\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, ansi_underline(), ansi_normal()
, ansi_highlight(), ansi_normal()
);
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
ansi_underline(),
ansi_normal(),
ansi_highlight(),
ansi_normal());
return 0;
}

View file

@ -2297,12 +2297,11 @@ static int help(void) {
" --watch-bind=BOOL Wait for bus AF_UNIX socket to be bound in the file\n"
" system\n"
" --destination=SERVICE Destination service of a signal\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;
}

View file

@ -57,10 +57,9 @@ static int help(void) {
" -l --full Do not ellipsize output\n"
" -k Include kernel threads in output\n"
" -M --machine= Show container\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;
}

View file

@ -722,11 +722,10 @@ static int help(void) {
" -b --batch Run in batch mode, accepting no input\n"
" --depth=DEPTH Maximum traversal depth (default: %u)\n"
" -M --machine= Show container\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, arg_depth
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
arg_depth,
link);
return 0;
}

View file

@ -1108,12 +1108,13 @@ static int help(void) {
" --log-time[=BOOL] Prefix log messages with current time\n"
" --default-standard-output= Set default standard output for services\n"
" --default-standard-error= Set default standard error output for services\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, ansi_highlight(), ansi_normal()
, ansi_underline(), ansi_normal()
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
ansi_highlight(),
ansi_normal(),
ansi_underline(),
ansi_normal(),
link);
return 0;
}

View file

@ -178,12 +178,11 @@ static int help(void) {
" --file=PATH Use journal file\n"
" -D --directory=DIR Use journal files from directory\n\n"
" -q --quiet Do not show info messages and privilege warning\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;
}

View file

@ -93,11 +93,11 @@ static int help(void) {
" Specify TPM2 PCRs to seal against\n"
" --wipe-slot=SLOT1,SLOT2,…\n"
" Wipe specified slots\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;
}

View file

@ -1334,11 +1334,10 @@ static int help(void) {
printf("%s attach VOLUME SOURCEDEVICE [PASSWORD] [OPTIONS]\n"
"%s detach VOLUME\n\n"
"Attaches or detaches an encrypted block device.\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, program_invocation_short_name
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
program_invocation_short_name,
link);
return 0;
}

View file

@ -532,10 +532,9 @@ static int help(void) {
" --no-pager Do not pipe output into a pager\n"
" --diff[=1|0] Show a diff when overridden files differ\n"
" -t --type=LIST... Only display a selected set of override types\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;
}

View file

@ -39,10 +39,9 @@ static int help(void) {
" --private-users Only detect whether we are running in a user namespace\n"
" -q --quiet Don't output anything, just set return value\n"
" --list List all known and detectable types of virtualization\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;
}

View file

@ -87,11 +87,13 @@ static int help(void) {
" -M Shortcut for --mount --mkdir\n"
" -x --copy-from Copy files from image to host\n"
" -a --copy-to Copy files from host to image\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, ansi_underline(), ansi_normal()
, ansi_highlight(), ansi_normal());
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
ansi_underline(),
ansi_normal(),
ansi_highlight(),
ansi_normal());
return 0;
}

View file

@ -40,10 +40,9 @@ static int help(void) {
" -u --unescape Unescape strings\n"
" -m --mangle Mangle strings\n"
" -p --path When escaping/unescaping assume the string is a path\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;
}

View file

@ -954,10 +954,9 @@ static int help(void) {
" --force Overwrite existing files\n"
" --delete-root-password Delete root password\n"
" --welcome=no Disable the welcome text\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;
}

View file

@ -2026,12 +2026,13 @@ static int help(int argc, char *argv[], void *userdata) {
" --kill-processes=BOOL Whether to kill user processes when sessions\n"
" terminate\n"
" --auto-login=BOOL Try to log this user in automatically\n"
"\nSee the %6$s for details.\n"
, program_invocation_short_name
, ansi_highlight(), ansi_normal()
, ansi_underline(), ansi_normal()
, link
);
"\nSee the %6$s for details.\n",
program_invocation_short_name,
ansi_highlight(),
ansi_normal(),
ansi_underline(),
ansi_normal(),
link);
return 0;
}

View file

@ -336,12 +336,11 @@ static int help(void) {
" --transient Only set transient hostname\n"
" --static Only set static hostname\n"
" --pretty Only set pretty hostname\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;
}

View file

@ -44,12 +44,11 @@ static int help(void) {
" -s --strict When updating, return non-zero exit value on any parsing error\n"
" --usr Generate in " UDEVLIBEXECDIR " instead of /etc/udev\n"
" -r --root=PATH Alternative root path in the filesystem\n\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;
}

View file

@ -167,11 +167,11 @@ static int help(void) {
" -p --pretty Generate samples of program code\n"
" -a --app-specific=ID Generate app-specific IDs\n"
" -u --uuid Output in UUID format\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;
}

View file

@ -852,10 +852,9 @@ static int help(void) {
" --key=KEY.PEM Server key in PEM format\n"
" --trust=CERT.PEM Certificate authority certificate in PEM format\n"
" -D --directory=PATH Serve journal files in directory\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;
}

View file

@ -801,10 +801,9 @@ static int help(void) {
" Specify a list of gnutls logging categories\n"
" --split-mode=none|host How many output files to create\n"
"\nNote: file descriptors from sd_listen_fds() will be consumed, too.\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;
}

View file

@ -606,10 +606,9 @@ static int help(void) {
" --follow[=BOOL] Do [not] wait for input\n"
" --save-state[=FILE] Save uploaded cursors (default \n"
" " STATE_FILE ")\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;
}

View file

@ -40,11 +40,11 @@ static int help(void) {
" -p --priority=PRIORITY Set priority value (0..7)\n"
" --stderr-priority=PRIORITY Set priority value (0..7) used for stderr\n"
" --level-prefix=BOOL Control whether level prefix shall be parsed\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;
}

View file

@ -402,12 +402,13 @@ static int help(void) {
" --dump-catalog Show entries in the message catalog\n"
" --update-catalog Update the message catalog database\n"
" --setup-keys Generate a new FSS key pair\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, ansi_underline(), ansi_normal()
, ansi_highlight(), ansi_normal()
);
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
ansi_underline(),
ansi_normal(),
ansi_highlight(),
ansi_normal());
return 0;
}

View file

@ -401,12 +401,11 @@ static int help(void) {
" -H --host=[USER@]HOST Operate on remote host\n"
" -M --machine=CONTAINER Operate on local container\n"
" --no-convert Don't convert keyboard mappings\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;
}

View file

@ -173,11 +173,11 @@ static int help(void) {
" --why=STRING A descriptive string why is being inhibited\n"
" --mode=MODE One of block or delay\n"
" --list List active inhibitors\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;
}

View file

@ -1276,12 +1276,11 @@ static int help(int argc, char *argv[], void *userdata) {
" short-monotonic, short-unix, verbose, export,\n"
" json, json-pretty, json-sse, json-seq, cat,\n"
" with-unit)\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;
}

View file

@ -35,10 +35,9 @@ static int help(void) {
" --root=ROOT Filesystem root\n"
" --commit Commit transient ID\n"
" --print Print used machine ID\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;
}

View file

@ -2534,14 +2534,13 @@ static int help(int argc, char *argv[], void *userdata) {
" --verify=MODE Verification mode for downloaded images (no,\n"
" checksum, signature)\n"
" --force Download image even if already exists\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;
}

View file

@ -115,10 +115,9 @@ static int help(void) {
"Loads statically configured kernel modules.\n\n"
" -h --help Show this help\n"
" --version Show package version\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;
}

View file

@ -114,11 +114,10 @@ static int help(void) {
" --list List mountable block devices\n"
" -u --umount Unmount mount points\n"
" -G --collect Unload unit after it stopped, even when failed\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, streq(program_invocation_short_name, "systemd-umount") ? "" : "--umount "
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
streq(program_invocation_short_name, "systemd-umount") ? "" : "--umount ",
link);
return 0;
}

View file

@ -117,9 +117,8 @@ static int help(void) {
printf("%s [OPTIONS...] [-- KERNEL_CMDLINE]\n"
" -h --help Show this help\n"
" --version Show package version\n"
" --root=PATH Operate on an alternate filesystem root\n"
, program_invocation_short_name
);
" --root=PATH Operate on an alternate filesystem root\n",
program_invocation_short_name);
return 0;
}

View file

@ -2711,12 +2711,11 @@ static int help(void) {
" -s --stats Show detailed link statics\n"
" -l --full Do not ellipsize output\n"
" -n --lines=INTEGER Number of journal entries to show\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;
}

View file

@ -44,10 +44,9 @@ static int help(void) {
" Required operational state\n"
" --any Wait until at least one of the interfaces is online\n"
" --timeout=SECS Maximum time to wait for network connectivity\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;
}

View file

@ -48,11 +48,11 @@ static int help(void) {
" --status=TEXT Set status text\n"
" --booted Check if the system was booted up with systemd\n"
" --no-block Do not wait until operation finished\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;
}

View file

@ -429,12 +429,13 @@ static int help(void) {
" --load-credential=ID:PATH\n"
" Load credential to pass to container from file or\n"
" AF_UNIX stream socket.\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, ansi_underline(), ansi_normal()
, ansi_highlight(), ansi_normal()
);
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
ansi_underline(),
ansi_normal(),
ansi_highlight(),
ansi_normal());
return 0;
}

View file

@ -30,12 +30,13 @@ static int help(int argc, char *argv[], void *userdata) {
" -h --help Show this help\n"
" --version Show package version\n"
" --no-pager Do not pipe output into a pager\n"
"\nSee the %6$s for details.\n"
, program_invocation_short_name
, ansi_highlight(), ansi_normal()
, ansi_underline(), ansi_normal()
, link
);
"\nSee the %6$s for details.\n",
program_invocation_short_name,
ansi_highlight(),
ansi_normal(),
ansi_underline(),
ansi_normal(),
link);
return 0;
}

View file

@ -53,10 +53,9 @@ static int help(void) {
" --version Show package version\n"
" --dry-run Only print destructive actions instead of doing them\n"
" --bus-introspect=PATH Write D-Bus XML introspection data\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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -142,10 +142,9 @@ static int help(void) {
" -h --help Show this help\n"
" --version Show package version\n"
" --suffix=SUFFIX Suffix to append to paths\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;
}

View file

@ -946,12 +946,11 @@ static int help(int argc, char *argv[], void *userdata) {
" --now Immediately start/stop the portable service after\n"
" attach/before detach\n"
" --no-block Don't block waiting for attach --now to complete\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;
}

View file

@ -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;
}

View file

@ -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;
}

View file

@ -131,11 +131,11 @@ static int help(void) {
" --on-timezone-change Run when the timezone changes\n"
" --on-clock-change Run when the realtime clock jumps\n"
" --timer-property=NAME=VALUE Set timer unit property\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;
}

View file

@ -308,10 +308,9 @@ static int help(void) {
" hybrid-sleep Both hibernate and suspend the system\n"
" suspend-then-hibernate Initially suspend and then hibernate\n"
" the system after a fixed period of time\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;
}

View file

@ -595,11 +595,10 @@ static int help(void) {
" the %3$s for time span format\n"
" -h --help Show this help\n"
" --version Show package version\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, time_link
);
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
time_link);
return 0;
}

View file

@ -294,10 +294,9 @@ static int help(void) {
" --cat-config Show configuration files\n"
" --prefix=PATH Only apply rules with the specified prefix\n"
" --no-pager Do not pipe output into a pager\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;
}

View file

@ -886,12 +886,13 @@ static int verb_help(int argc, char **argv, void *userdata) {
" --json=pretty|short|off\n"
" Generate JSON output\n"
" --force Ignore version incompatibilities\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, ansi_underline(), ansi_normal()
, ansi_highlight(), ansi_normal()
);
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
ansi_underline(),
ansi_normal(),
ansi_highlight(),
ansi_normal());
return 0;
}

View file

@ -36,16 +36,15 @@ static int halt_help(void) {
" -w --wtmp-only Don't halt/power-off/reboot, just write wtmp record\n"
" -d --no-wtmp Don't write wtmp record\n"
" --no-wall Don't send wall message before halt/power-off/reboot\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, arg_action == ACTION_REBOOT ? " [ARG]" : ""
, ansi_highlight()
, arg_action == ACTION_REBOOT ? "Reboot" :
arg_action == ACTION_POWEROFF ? "Power off" :
"Halt"
, ansi_normal()
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
arg_action == ACTION_REBOOT ? " [ARG]" : "",
ansi_highlight(),
arg_action == ACTION_REBOOT ? "Reboot" :
arg_action == ACTION_POWEROFF ? "Power off" :
"Halt",
ansi_normal(),
link);
return 0;
}

View file

@ -21,11 +21,11 @@ static int runlevel_help(void) {
"\n%sPrints the previous and current runlevel of the init system.%s\n"
"\nOptions:\n"
" --help Show this help\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;
}

View file

@ -28,11 +28,11 @@ static int shutdown_help(void) {
" -k Don't halt/power-off/reboot, just send warnings\n"
" --no-wall Don't send wall message before halt/power-off/reboot\n"
" -c Cancel a pending shutdown\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;
}

View file

@ -31,11 +31,11 @@ static int telinit_help(void) {
"\nOptions:\n"
" --help Show this help\n"
" --no-wall Don't send wall message before halt/power-off/reboot\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;
}

View file

@ -295,12 +295,13 @@ static int systemctl_help(void) {
" 'us+utc': 'Day YYYY-MM-DD HH:MM:SS.UUUUUU UTC\n"
" --read-only Create read-only bind mount\n"
" --mkdir Create directory before mounting, if missing\n"
"\nSee the %2$s for details.\n"
, program_invocation_short_name
, link
, ansi_underline(), ansi_normal()
, ansi_highlight(), ansi_normal()
);
"\nSee the %2$s for details.\n",
program_invocation_short_name,
link,
ansi_underline(),
ansi_normal(),
ansi_highlight(),
ansi_normal());
return 0;
}

View file

@ -1762,10 +1762,9 @@ static int help(void) {
" --replace=PATH Treat arguments as replacement for PATH\n"
" --inline Treat arguments as configuration lines\n"
" --no-pager Do not pipe output into a pager\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;
}

View file

@ -916,12 +916,11 @@ static int help(void) {
" -p --property=NAME Show only properties by this name\n"
" -a --all Show all properties, including empty ones\n"
" --value When showing properties, only print the value\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;
}

View file

@ -3013,11 +3013,11 @@ static int help(void) {
" --image=PATH Operate on disk image as filesystem root\n"
" --replace=PATH Treat arguments as replacement for PATH\n"
" --no-pager Do not pipe output into a pager\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;
}

View file

@ -424,10 +424,9 @@ static int help(void) {
" --wall Continuously forward password requests to wall\n"
" --plymouth Ask question with Plymouth instead of on TTY\n"
" --console Ask question on /dev/console instead of current TTY\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;
}

View file

@ -299,9 +299,8 @@ static void help(void) {
" -g --whitelisted Treat device as whitelisted\n"
" -u --replace-whitespace Replace all whitespace by underscores\n"
" -v --verbose Verbose logging\n"
" -x --export Print values as environment keys\n"
, program_invocation_short_name);
" -x --export Print values as environment keys\n",
program_invocation_short_name);
}
static int set_options(int argc, char **argv,

View file

@ -41,8 +41,8 @@ static int help(void) {
" -p --property=KEY=VALUE Set a global property for all events\n"
" -m --children-max=N Maximum number of children\n"
" --ping Wait for udev to respond to a ping message\n"
" -t --timeout=SECONDS Maximum time to block for a reply\n"
, program_invocation_short_name);
" -t --timeout=SECONDS Maximum time to block for a reply\n",
program_invocation_short_name);
return 0;
}

View file

@ -23,8 +23,8 @@ static int help(void) {
" -r --root=PATH Alternative root path in the filesystem\n\n"
"NOTE:\n"
"The sub-command 'hwdb' is deprecated, and is left for backwards compatibility.\n"
"Please use systemd-hwdb instead.\n"
, program_invocation_short_name);
"Please use systemd-hwdb instead.\n",
program_invocation_short_name);
return 0;
}

View file

@ -356,8 +356,8 @@ static int help(void) {
" -e --export-db Export the content of the udev database\n"
" -c --cleanup-db Clean up the udev database\n"
" -w --wait-for-initialization[=SECONDS]\n"
" Wait for device to be initialized\n"
, program_invocation_short_name);
" Wait for device to be initialized\n",
program_invocation_short_name);
return 0;
}

View file

@ -107,8 +107,8 @@ static int help(void) {
" -k --kernel Print kernel uevents\n"
" -u --udev Print udev events\n"
" -s --subsystem-match=SUBSYSTEM[/DEVTYPE] Filter events by subsystem\n"
" -t --tag-match=TAG Filter events by tag\n"
, program_invocation_short_name);
" -t --tag-match=TAG Filter events by tag\n",
program_invocation_short_name);
return 0;
}

View file

@ -38,8 +38,8 @@ static int help(void) {
" -h --help Show this help\n"
" -V --version Show package version\n"
" -t --timeout=SEC Maximum time to wait for events\n"
" -E --exit-if-exists=FILE Stop waiting if file exists\n"
, program_invocation_short_name);
" -E --exit-if-exists=FILE Stop waiting if file exists\n",
program_invocation_short_name);
return 0;
}

View file

@ -19,8 +19,8 @@ static int help(void) {
"Test a built-in command.\n\n"
" -h --help Print this message\n"
" -V --version Print version of the program\n\n"
"Commands:\n"
, program_invocation_short_name);
"Commands:\n",
program_invocation_short_name);
udev_builtin_list();

View file

@ -34,8 +34,8 @@ static int help(void) {
" -h --help Show this help\n"
" -V --version Show package version\n"
" -a --action=ACTION|help Set action string\n"
" -N --resolve-names=early|late|never When to resolve names\n"
, program_invocation_short_name);
" -N --resolve-names=early|late|never When to resolve names\n",
program_invocation_short_name);
return 0;
}

View file

@ -133,8 +133,8 @@ static int help(void) {
" -b --parent-match=NAME Trigger devices with that parent device\n"
" -w --settle Wait for the triggered events to complete\n"
" --wait-daemon[=SECONDS] Wait for udevd daemon to be initialized\n"
" before triggering uevents\n"
, program_invocation_short_name);
" before triggering uevents\n",
program_invocation_short_name);
return 0;
}

View file

@ -37,8 +37,8 @@ static int help(void) {
printf("%s [--help] [--version] [--debug] COMMAND [COMMAND OPTIONS]\n\n"
"Send control commands or test the device manager.\n\n"
"Commands:\n"
, program_invocation_short_name);
"Commands:\n",
program_invocation_short_name);
for (i = 0; i < ELEMENTSOF(short_descriptions); i++)
printf(" %-12s %s\n", short_descriptions[i][0], short_descriptions[i][1]);

View file

@ -1578,10 +1578,9 @@ static int help(void) {
" -t --event-timeout=SECONDS Seconds to wait before terminating an event\n"
" -N --resolve-names=early|late|never\n"
" When to resolve users and groups\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;
}

View file

@ -45,8 +45,8 @@ int main(int argc, char *argv[]) {
case 'h':
printf("%s [-h,--help] <device file>\n\n"
"Video4Linux device identification.\n\n"
" -h Print this message\n"
, program_invocation_short_name);
" -h Print this message\n",
program_invocation_short_name);
return 0;
case '?':
return -EINVAL;

View file

@ -600,11 +600,11 @@ static int help(int argc, char *argv[], void *userdata) {
" -N Do not synthesize or include glibc NSS data\n"
" (Same as --synthesize=no --with-nss=no)\n"
" --synthesize=BOOL Synthesize root/nobody user\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;
}

View file

@ -31,11 +31,10 @@ static int help(void) {
printf("%s attach VOLUME DATADEVICE HASHDEVICE ROOTHASH [OPTIONS]\n"
"%s detach VOLUME\n\n"
"Attaches or detaches an integrity protected block device.\n"
"\nSee the %s for details.\n"
, program_invocation_short_name
, program_invocation_short_name
, link
);
"\nSee the %s for details.\n",
program_invocation_short_name,
program_invocation_short_name,
link);
return 0;
}