dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0077-Improve-LVM-logical_volumes-string-matching.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Colin Watson <cjwatson@ubuntu.com>
f725e3
Date: Thu, 10 Apr 2014 14:42:41 +0100
f725e3
Subject: [PATCH] Improve LVM "logical_volumes" string matching
f725e3
f725e3
* grub-core/disk/lvm.c (grub_lvm_detect): Search for
f725e3
"logical_volumes" block a little more accurately.
f725e3
---
f725e3
 grub-core/disk/lvm.c | 4 ++--
f725e3
 ChangeLog            | 5 +++++
f725e3
 2 files changed, 7 insertions(+), 2 deletions(-)
f725e3
f725e3
diff --git a/grub-core/disk/lvm.c b/grub-core/disk/lvm.c
f725e3
index 483c17eb5f6..862a9664f2c 100644
f725e3
--- a/grub-core/disk/lvm.c
f725e3
+++ b/grub-core/disk/lvm.c
f725e3
@@ -333,10 +333,10 @@ grub_lvm_detect (grub_disk_t disk,
f725e3
 	    }
f725e3
 	}
f725e3
 
f725e3
-      p = grub_strstr (p, "logical_volumes");
f725e3
+      p = grub_strstr (p, "logical_volumes {");
f725e3
       if (p)
f725e3
 	{
f725e3
-	  p += sizeof ("logical_volumes = ") - 1;
f725e3
+	  p += sizeof ("logical_volumes {") - 1;
f725e3
 
f725e3
 	  /* And add all the lvs to the volume group. */
f725e3
 	  while (1)
f725e3
diff --git a/ChangeLog b/ChangeLog
f725e3
index 50d9291624a..7f0c57dc0ae 100644
f725e3
--- a/ChangeLog
f725e3
+++ b/ChangeLog
f725e3
@@ -1,3 +1,8 @@
f725e3
+2014-04-10  Colin Watson  <cjwatson@ubuntu.com>
f725e3
+
f725e3
+	* grub-core/disk/lvm.c (grub_lvm_detect): Search for
f725e3
+	"logical_volumes" block a little more accurately.
f725e3
+
f725e3
 2014-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
f725e3
 
f725e3
 	* grub-core/lib/syslinux_parse.c: Fix timeout quoting.