dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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