]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev: do not hardcode program name 13761/head
authorDavid Tardon <dtardon@redhat.com>
Fri, 11 Oct 2019 12:41:58 +0000 (14:41 +0200)
committerDavid Tardon <dtardon@redhat.com>
Fri, 11 Oct 2019 12:45:02 +0000 (14:45 +0200)
src/udev/ata_id/ata_id.c
src/udev/cdrom_id/cdrom_id.c

index e5a9400edacc00b0bdd69d4f1a8ac7af1c878bbe..deeb939f54a17ed6b28e20e2a473abd012f03b56 100644 (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;
                 }
         }
index a287901266baad43068fa335843353bcf1f0a3b1..75afe4e7c9e96cfccbd79b6ac29764c7b4c597b3 100644 (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;