Blame SOURCES/0069-Fix-grub-probe-0-option.patch

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