|
|
39700a |
From c889057e089d69bd187c8ba134c9669247744628 Mon Sep 17 00:00:00 2001
|
|
|
39700a |
From: Mike Gilbert <floppym@gentoo.org>
|
|
|
39700a |
Date: Sun, 26 Jan 2014 02:56:04 +0100
|
|
|
39700a |
Subject: [PATCH 047/143] grub-install: support for partitioned partx
|
|
|
39700a |
loop devices.
|
|
|
39700a |
|
|
|
39700a |
* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|
|
|
39700a |
/dev/loopX as being the parent of /dev/loopXpY.
|
|
|
39700a |
---
|
|
|
39700a |
ChangeLog | 7 +++++++
|
|
|
39700a |
grub-core/osdep/linux/getroot.c | 13 +++++++++++++
|
|
|
39700a |
2 files changed, 20 insertions(+)
|
|
|
39700a |
|
|
|
39700a |
diff --git a/ChangeLog b/ChangeLog
|
|
|
39700a |
index 67b4d5c..bbec1e7 100644
|
|
|
39700a |
--- a/ChangeLog
|
|
|
39700a |
+++ b/ChangeLog
|
|
|
39700a |
@@ -1,3 +1,10 @@
|
|
|
39700a |
+2014-01-26 Mike Gilbert <floppym@gentoo.org>
|
|
|
39700a |
+
|
|
|
39700a |
+ grub-install: support for partitioned partx loop devices.
|
|
|
39700a |
+
|
|
|
39700a |
+ * grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect
|
|
|
39700a |
+ /dev/loopX as being the parent of /dev/loopXpY.
|
|
|
39700a |
+
|
|
|
39700a |
2014-01-26 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
39700a |
|
|
|
39700a |
* grub-core/term/serial.c (grub_serial_register): Fix invalid free.
|
|
|
39700a |
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
|
|
|
39700a |
index 772de0a..19581d3 100644
|
|
|
39700a |
--- a/grub-core/osdep/linux/getroot.c
|
|
|
39700a |
+++ b/grub-core/osdep/linux/getroot.c
|
|
|
39700a |
@@ -883,6 +883,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
|
|
|
39700a |
*pp = '\0';
|
|
|
39700a |
return path;
|
|
|
39700a |
}
|
|
|
39700a |
+
|
|
|
39700a |
+ /* If this is a loop device */
|
|
|
39700a |
+ if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9')
|
|
|
39700a |
+ {
|
|
|
39700a |
+ char *pp = p + 4;
|
|
|
39700a |
+ while (*pp >= '0' && *pp <= '9')
|
|
|
39700a |
+ pp++;
|
|
|
39700a |
+ if (*pp == 'p')
|
|
|
39700a |
+ *is_part = 1;
|
|
|
39700a |
+ /* /dev/loop[0-9]+p[0-9]* */
|
|
|
39700a |
+ *pp = '\0';
|
|
|
39700a |
+ return path;
|
|
|
39700a |
+ }
|
|
|
39700a |
}
|
|
|
39700a |
|
|
|
39700a |
return path;
|
|
|
39700a |
--
|
|
|
39700a |
1.9.3
|
|
|
39700a |
|