nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone
23d2ea
From cf7c88c63e219f906d058b71f889264ac8e3bc3b Mon Sep 17 00:00:00 2001
39700a
From: Colin Watson <cjwatson@ubuntu.com>
39700a
Date: Mon, 31 Mar 2014 13:51:17 +0100
27a4da
Subject: [PATCH 069/260] Fix grub-probe -0 option
39700a
39700a
* util/grub-probe,c (options): Make -0 work again (broken by
39700a
conversion to argp).
39700a
(main): Simplify logic.
39700a
---
39700a
 ChangeLog         | 6 ++++++
39700a
 util/grub-probe.c | 7 ++-----
39700a
 2 files changed, 8 insertions(+), 5 deletions(-)
39700a
39700a
diff --git a/ChangeLog b/ChangeLog
27a4da
index 9404edab8..efbed8ccb 100644
39700a
--- a/ChangeLog
39700a
+++ b/ChangeLog
39700a
@@ -1,3 +1,9 @@
39700a
+2014-03-31  Colin Watson  <cjwatson@ubuntu.com>
39700a
+
39700a
+	* util/grub-probe,c (options): Make -0 work again (broken by
39700a
+	conversion to argp).
39700a
+	(main): Simplify logic.
39700a
+
39700a
 2014-03-26  Vladimir Serbinenko  <phcoder@gmail.com>
39700a
 
39700a
 	* grub-core/lib/relocator.c: Fix the case when end of leftover is used.
39700a
diff --git a/util/grub-probe.c b/util/grub-probe.c
27a4da
index 1f3b59f05..80509be8a 100644
39700a
--- a/util/grub-probe.c
39700a
+++ b/util/grub-probe.c
39700a
@@ -711,6 +711,7 @@ static struct argp_option options[] = {
39700a
    N_("use FILE as the device map [default=%s]"), 0},
39700a
   {"target",  't', N_("TARGET"), 0, 0, 0},
39700a
   {"verbose",     'v', 0,      0, N_("print verbose messages."), 0},
39700a
+  {0, '0', 0, 0, N_("separate items in output using ASCII NUL characters"), 0},
39700a
   { 0, 0, 0, 0, 0, 0 }
39700a
 };
39700a
 
39700a
@@ -884,11 +885,7 @@ main (int argc, char *argv[])
39700a
   else
39700a
     probe (arguments.devices[0], NULL, delim);
39700a
 
39700a
-  if (!arguments.zero_delim && (print == PRINT_BIOS_HINT
39700a
-				|| print == PRINT_IEEE1275_HINT
39700a
-				|| print == PRINT_BAREMETAL_HINT
39700a
-				|| print == PRINT_EFI_HINT
39700a
-				|| print == PRINT_ARC_HINT))
39700a
+  if (delim == ' ')
39700a
     putchar ('\n');
39700a
 
39700a
   /* Free resources.  */
39700a
-- 
27a4da
2.13.0
39700a