]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Fix grub-probe -0 option
authorColin Watson <cjwatson@ubuntu.com>
Mon, 31 Mar 2014 12:51:17 +0000 (13:51 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Mon, 31 Mar 2014 12:51:17 +0000 (13:51 +0100)
* util/grub-probe,c (options): Make -0 work again (broken by
conversion to argp).
(main): Simplify logic.

ChangeLog
util/grub-probe.c

index b3f077a5e936976b8df90f2d55723ef2132286c7..46a656184a24e7dbbc60ea93e3f944a275594b81 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-03-31  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub-probe,c (options): Make -0 work again (broken by
+       conversion to argp).
+       (main): Simplify logic.
+
 2014-03-26  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/lib/relocator.c: Fix the case when end of leftover is used.
index 1f3b59f05b91c1a66e077bb4ccc0a5d6bb928924..80509be8aa7b033e13229ec85723c9d835155b6a 100644 (file)
@@ -711,6 +711,7 @@ static struct argp_option options[] = {
    N_("use FILE as the device map [default=%s]"), 0},
   {"target",  't', N_("TARGET"), 0, 0, 0},
   {"verbose",     'v', 0,      0, N_("print verbose messages."), 0},
+  {0, '0', 0, 0, N_("separate items in output using ASCII NUL characters"), 0},
   { 0, 0, 0, 0, 0, 0 }
 };
 
@@ -884,11 +885,7 @@ main (int argc, char *argv[])
   else
     probe (arguments.devices[0], NULL, delim);
 
-  if (!arguments.zero_delim && (print == PRINT_BIOS_HINT
-                               || print == PRINT_IEEE1275_HINT
-                               || print == PRINT_BAREMETAL_HINT
-                               || print == PRINT_EFI_HINT
-                               || print == PRINT_ARC_HINT))
+  if (delim == ' ')
     putchar ('\n');
 
   /* Free resources.  */