dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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