dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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