From b79889ba767ca02de3a7db14ef32a2e9c11169a6 Mon Sep 17 00:00:00 2001 From: Robert Millan Date: Thu, 1 Jul 2010 10:52:23 +0200 Subject: [PATCH] 2010-07-01 Robert Millan * kern/emu/hostdisk.c (convert_system_partition_to_system_disk): Support 'p' as partition separator on kernel of FreeBSD (used with GPT labels). (grub_util_biosdisk_get_grub_dev): Likewise. --- ChangeLog | 7 +++++++ kern/emu/hostdisk.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70572f940..f21d94425 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-07-01 Robert Millan + + * kern/emu/hostdisk.c (convert_system_partition_to_system_disk): + Support 'p' as partition separator on kernel of FreeBSD (used + with GPT labels). + (grub_util_biosdisk_get_grub_dev): Likewise. + 2010-07-01 Vladimir Serbinenko Yeeloong firmware port. diff --git a/kern/emu/hostdisk.c b/kern/emu/hostdisk.c index bc37e9949..2cdf449e2 100644 --- a/kern/emu/hostdisk.c +++ b/kern/emu/hostdisk.c @@ -1260,7 +1260,7 @@ devmapper_out: for (p = path + 5; *p; ++p) if (grub_isdigit(*p)) { - p = strchr (p, 's'); + p = strpbrk (p, "sp"); if (p) *p = '\0'; break; @@ -1507,7 +1507,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev) } #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) - /* FreeBSD uses "/dev/[a-z]+[0-9]+(s[0-9]+[a-z]?)?". */ + /* FreeBSD uses "/dev/[a-z]+[0-9]+([sp][0-9]+[a-z]?)?". */ { int dos_part = -1; int bsd_part = -1; @@ -1521,7 +1521,7 @@ grub_util_biosdisk_get_grub_dev (const char *os_dev) for (p = os_dev + 5; *p; ++p) if (grub_isdigit(*p)) { - p = strchr (p, 's'); /* msdos or apple (or ... ?) partition map */ + p = strpbrk (p, "sp"); /* msdos or apple (or ... ?) partition map */ if (p) { p++;