1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-22 22:03:43 +03:00

Merge pull request #13761 from dtardon/program-name

udev: do not hardcode program name
This commit is contained in:
Yu Watanabe 2019-10-14 20:17:28 +09:00 committed by GitHub
commit c94f7809e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -425,9 +425,10 @@ int main(int argc, char *argv[]) {
export = 1;
break;
case 'h':
printf("Usage: ata_id [--export] [--help] <device>\n"
printf("Usage: %s [--export] [--help] <device>\n"
" -x,--export print values as environment keys\n"
" -h,--help print this help text\n\n");
" -h,--help print this help text\n\n",
program_invocation_short_name);
return 0;
}
}

View File

@ -849,12 +849,13 @@ int main(int argc, char *argv[]) {
log_open();
break;
case 'h':
printf("Usage: cdrom_id [options] <device>\n"
printf("Usage: %s [options] <device>\n"
" -l,--lock-media lock the media (to enable eject request events)\n"
" -u,--unlock-media unlock the media\n"
" -e,--eject-media eject the media\n"
" -d,--debug debug to stderr\n"
" -h,--help print this help text\n\n");
" -h,--help print this help text\n\n",
program_invocation_short_name);
goto exit;
default:
rc = 1;

View File

@ -44,7 +44,7 @@ static int run(int argc, char **argv) {
log_open();
if (argc > 2)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Usage: hidraw_id [SYSFS_PATH]");
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Usage: %s [SYSFS_PATH]", program_invocation_short_name);
if (argc == 1) {
r = device_new_from_strv(&device, environ);