]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-11-14 Robert Millan <rmh.grub@aybabtu.com>
authorRobert Millan <rmh@aybabtu.com>
Sat, 14 Nov 2009 21:20:02 +0000 (21:20 +0000)
committerRobert Millan <rmh@aybabtu.com>
Sat, 14 Nov 2009 21:20:02 +0000 (21:20 +0000)
        Fix help2man generation for mkisofs.

        * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
        (usage): Send output to stdout (rather than stderr).

ChangeLog
util/mkisofs/mkisofs.c

index 04ff39c84fb80594817d08a0675b07c3790f4fb9..2b5c24e96cfa7c07994364282e2ab33147a72281 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-11-14  Robert Millan  <rmh.grub@aybabtu.com>
+
+       Fix help2man generation for mkisofs.
+
+       * util/mkisofs/mkisofs.c (ld_options): Recognize --help.
+       (usage): Send output to stdout (rather than stderr).
+
 2009-11-14  Robert Millan  <rmh.grub@aybabtu.com>
 
        * conf/i386-coreboot.rmk (grub_mkrescue_SOURCES): Replace
index 0c89a2d8c4e9f16e21ba43609969fecc16435432..bc63967d076475047ab270e271c7dd91410c9ad2 100644 (file)
@@ -227,6 +227,8 @@ static const struct ld_option ld_options[] =
       'f', NULL, "Follow symbolic links", ONE_DASH },
   { {"help", no_argument, NULL, OPTION_HELP},
       '\0', NULL, "Print option help", ONE_DASH },
+  { {"help", no_argument, NULL, OPTION_HELP},
+      '\0', NULL, "Print option help", TWO_DASHES },
   { {"hide", required_argument, NULL, OPTION_I_HIDE},
       '\0', "GLOBFILE", "Hide ISO9660/RR file" , ONE_DASH },
   { {"hide-joliet", required_argument, NULL, OPTION_J_HIDE},
@@ -476,9 +478,9 @@ void usage(){
   unsigned int i;
 /*  const char **targets, **pp;*/
 
-  fprintf (stderr, "Usage: %s [options] file...\n", program_name);
+  printf ("Usage: %s [options] file...\n", program_name);
 
-  fprintf (stderr, "Options:\n");
+  printf ("Options:\n");
   for (i = 0; i < OPTION_COUNT; i++)
     {
       if (ld_options[i].doc != NULL)
@@ -487,7 +489,7 @@ void usage(){
          int len;
          unsigned int j;
 
-         fprintf (stderr, "  ");
+         printf ("  ");
 
          comma = FALSE;
          len = 2;
@@ -498,16 +500,16 @@ void usage(){
              if (ld_options[j].shortopt != '\0'
                  && ld_options[j].control != NO_HELP)
                {
-                 fprintf (stderr, "%s-%c", comma ? ", " : "", ld_options[j].shortopt);
+                 printf ("%s-%c", comma ? ", " : "", ld_options[j].shortopt);
                  len += (comma ? 2 : 0) + 2;
                  if (ld_options[j].arg != NULL)
                    {
                      if (ld_options[j].opt.has_arg != optional_argument)
                        {
-                         fprintf (stderr, " ");
+                         putchar (' ');
                          ++len;
                        }
-                     fprintf (stderr, "%s", ld_options[j].arg);
+                     printf ("%s", ld_options[j].arg);
                      len += strlen (ld_options[j].arg);
                    }
                  comma = TRUE;
@@ -522,7 +524,7 @@ void usage(){
              if (ld_options[j].opt.name != NULL
                  && ld_options[j].control != NO_HELP)
                {
-                 fprintf (stderr, "%s-%s%s",
+                 printf ("%s-%s%s",
                          comma ? ", " : "",
                          ld_options[j].control == TWO_DASHES ? "-" : "",
                          ld_options[j].opt.name);
@@ -532,7 +534,7 @@ void usage(){
                          + strlen (ld_options[j].opt.name));
                  if (ld_options[j].arg != NULL)
                    {
-                     fprintf (stderr, " %s", ld_options[j].arg);
+                     printf (" %s", ld_options[j].arg);
                      len += 1 + strlen (ld_options[j].arg);
                    }
                  comma = TRUE;
@@ -543,14 +545,14 @@ void usage(){
 
          if (len >= 30)
            {
-             fprintf (stderr, "\n");
+             printf ("\n");
              len = 0;
            }
 
          for (; len < 30; len++)
-           fputc (' ', stderr);
+           putchar (' ');
 
-         fprintf (stderr, "%s\n", ld_options[i].doc);
+         printf ("%s\n", ld_options[i].doc);
        }
     }
   exit(1);