dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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