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