summaryrefslogtreecommitdiffstats
path: root/src/udev
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2021-01-30 15:13:04 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-01-31 05:14:02 +0100
commitbc556335b1c568c98688cc1f586b5f753fcddac6 (patch)
tree2f9336fb6ea885d672e8c0e23300a448a554ce02 /src/udev
parentman: fix small issue in AllowedMemoryNodes description (diff)
downloadsystemd-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/udev')
-rw-r--r--src/udev/scsi_id/scsi_id.c5
-rw-r--r--src/udev/udevadm-control.c4
-rw-r--r--src/udev/udevadm-hwdb.c4
-rw-r--r--src/udev/udevadm-info.c4
-rw-r--r--src/udev/udevadm-monitor.c4
-rw-r--r--src/udev/udevadm-settle.c4
-rw-r--r--src/udev/udevadm-test-builtin.c4
-rw-r--r--src/udev/udevadm-test.c4
-rw-r--r--src/udev/udevadm-trigger.c4
-rw-r--r--src/udev/udevadm.c4
-rw-r--r--src/udev/udevd.c7
-rw-r--r--src/udev/v4l_id/v4l_id.c4
12 files changed, 25 insertions, 27 deletions
diff --git a/src/udev/scsi_id/scsi_id.c b/src/udev/scsi_id/scsi_id.c
index bce8b4c69f..0c4a17c456 100644
--- a/src/udev/scsi_id/scsi_id.c
+++ b/src/udev/scsi_id/scsi_id.c
@@ -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,
diff --git a/src/udev/udevadm-control.c b/src/udev/udevadm-control.c
index ef23a6c9f6..437ac9b832 100644
--- a/src/udev/udevadm-control.c
+++ b/src/udev/udevadm-control.c
@@ -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;
}
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index 3d219222b9..9414269fb8 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -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;
}
diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c
index 5ff6256dfa..71cc0d2d9b 100644
--- a/src/udev/udevadm-info.c
+++ b/src/udev/udevadm-info.c
@@ -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;
}
diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c
index 64b1160d71..1a8a1a5b3b 100644
--- a/src/udev/udevadm-monitor.c
+++ b/src/udev/udevadm-monitor.c
@@ -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;
}
diff --git a/src/udev/udevadm-settle.c b/src/udev/udevadm-settle.c
index 33d7990572..2c61c2d8b0 100644
--- a/src/udev/udevadm-settle.c
+++ b/src/udev/udevadm-settle.c
@@ -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;
}
diff --git a/src/udev/udevadm-test-builtin.c b/src/udev/udevadm-test-builtin.c
index 8995e5ccae..008d6f2914 100644
--- a/src/udev/udevadm-test-builtin.c
+++ b/src/udev/udevadm-test-builtin.c
@@ -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();
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c
index e6a5f423e5..e28378eea8 100644
--- a/src/udev/udevadm-test.c
+++ b/src/udev/udevadm-test.c
@@ -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;
}
diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c
index f7ca88195d..7a9f968128 100644
--- a/src/udev/udevadm-trigger.c
+++ b/src/udev/udevadm-trigger.c
@@ -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;
}
diff --git a/src/udev/udevadm.c b/src/udev/udevadm.c
index 39e40411b1..47d1a2fb9c 100644
--- a/src/udev/udevadm.c
+++ b/src/udev/udevadm.c
@@ -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]);
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index a19232bd4e..0134f78b4b 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -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;
}
diff --git a/src/udev/v4l_id/v4l_id.c b/src/udev/v4l_id/v4l_id.c
index 932446b766..26b634ef5b 100644
--- a/src/udev/v4l_id/v4l_id.c
+++ b/src/udev/v4l_id/v4l_id.c
@@ -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;