chiark / gitweb /
udev: improve help/usage for some more programs
authorRobert Milasan <rmilasan@suse.com>
Thu, 1 Jan 2015 17:11:22 +0000 (18:11 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 1 Jan 2015 19:38:21 +0000 (14:38 -0500)
src/udev/ata_id/ata_id.c
src/udev/cdrom_id/cdrom_id.c
src/udev/collect/collect.c
src/udev/scsi_id/scsi_id.c
src/udev/v4l_id/v4l_id.c

index e6344f983a868a22f0b45b151597812f282c94fe..31bc1675e8dcb2bba4e76cf78c2defeae08659f9 100644 (file)
@@ -450,8 +450,8 @@ int main(int argc, char *argv[])
                         break;
                 case 'h':
                         printf("Usage: ata_id [--export] [--help] <device>\n"
                         break;
                 case 'h':
                         printf("Usage: ata_id [--export] [--help] <device>\n"
-                               "  --export    print values as environment keys\n"
-                               "  --help      print this help text\n\n");
+                               "  -x,--export    print values as environment keys\n"
+                               "  -h,--help      print this help text\n\n");
                         return 0;
                 }
         }
                         return 0;
                 }
         }
index 8a41c4f2bd0a1f8e59ac3bbc16063914c2d6981c..6052f6abd8f3533b694ca8bb73d20a4e9428cbee 100644 (file)
@@ -891,11 +891,11 @@ int main(int argc, char *argv[])
                         break;
                 case 'h':
                         printf("Usage: cdrom_id [options] <device>\n"
                         break;
                 case 'h':
                         printf("Usage: cdrom_id [options] <device>\n"
-                               "  --lock-media    lock the media (to enable eject request events)\n"
-                               "  --unlock-media  unlock the media\n"
-                               "  --eject-media   eject the media\n"
-                               "  --debug         debug to stderr\n"
-                               "  --help          print this help text\n\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");
                         goto exit;
                 default:
                         rc = 1;
                         goto exit;
                 default:
                         rc = 1;
index 16675fbe0e0feab01eadfd16dfc6a3535407f8f8..11a618c8e24e8aaf94e701bb646b6dd4a51cbfd7 100644 (file)
@@ -68,15 +68,17 @@ noreturn static void sig_alrm(int signo)
 
 static void usage(void)
 {
 
 static void usage(void)
 {
-        printf("usage: collect [--add|--remove] [--debug] <checkpoint> <id> <idlist>\n"
-               "\n"
+        printf("Usage: collect [options] <checkpoint> <id> <idlist>\n"
+               "  -a,--add         add ID <id> to the list <idlist>\n"
+               "  -r,--remove      remove ID <id> from the list <idlist>\n"
+               "  -d,--debug       debug to stderr\n"
+               "  -h,--help        print this help text\n\n"
                "  Adds ID <id> to the list governed by <checkpoint>.\n"
                "  <id> must be part of the list <idlist>.\n"
                "  If all IDs given by <idlist> are listed (ie collect has been\n"
                "  invoked for each ID in <idlist>) collect returns 0, the\n"
                "  number of missing IDs otherwise.\n"
                "  Adds ID <id> to the list governed by <checkpoint>.\n"
                "  <id> must be part of the list <idlist>.\n"
                "  If all IDs given by <idlist> are listed (ie collect has been\n"
                "  invoked for each ID in <idlist>) collect returns 0, the\n"
                "  number of missing IDs otherwise.\n"
-               "  On error a negative number is returned.\n"
-               "\n");
+               "  On error a negative number is returned.\n\n");
 }
 
 /*
 }
 
 /*
index 27adb09d1584b26d8fa3b23a986a6e74aec5dec7..52702331a33dba86a596ea7c92912dbd35487f90 100644 (file)
@@ -313,7 +313,7 @@ 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"
                "  -g,--whitelisted                 treat device as whitelisted\n"
                "  -u,--replace-whitespace          replace all whitespace by underscores\n"
                "  -v,--verbose                     verbose logging\n"
-               "     --version                     print version\n"
+               "  -V,--version                     print version\n"
                "  -x,--export                      print values as environment keys\n"
                "  -h,--help                        print this help text\n\n");
 
                "  -x,--export                      print values as environment keys\n"
                "  -h,--help                        print this help text\n\n");
 
index d5463b27e51ffe861fa7c385ee99b75dd6b8715f..08d3efa857e8904fe333558a8037af516b49ba19 100644 (file)
@@ -45,7 +45,7 @@ int main (int argc, char *argv[])
 
                 switch (option) {
                 case 'h':
 
                 switch (option) {
                 case 'h':
-                        printf("Usage: v4l_id [--help] <device file>\n\n");
+                        printf("Usage: v4l_id [-h,--help] <device file>\n\n");
                         return 0;
                 default:
                         return 1;
                         return 0;
                 default:
                         return 1;