mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 15:22:39 +00:00
grub-install: support for partitioned partx loop devices.
* grub-core/osdep/linux/getroot.c (grub_util_part_to_disk): Detect /dev/loopX as being the parent of /dev/loopXpY.
This commit is contained in:
1 parent
9afe2053c9
commit
35f2d96c0d
2 files changed
+20
No files matched your search
@@ -883,6 +883,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
|
||||
*pp = '\0';
|
||||
return path;
|
||||
}
|
||||
|
||||
/* If this is a loop device */
|
||||
if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9')
|
||||
{
|
||||
char *pp = p + 4;
|
||||
while (*pp >= '0' && *pp <= '9')
|
||||
pp++;
|
||||
if (*pp == 'p')
|
||||
*is_part = 1;
|
||||
/* /dev/loop[0-9]+p[0-9]* */
|
||||
*pp = '\0';
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
|
||||
Reference in new issue
Block a user