2008-05-28 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC devices. * util/grub-mkdevicemap.c (get_mmc_disk_name) (make_device_map): Likewise.
This commit is contained in:
parent
887d2619bf
commit
23023641b8
3 changed files with 46 additions and 1 deletions
|
@ -239,7 +239,7 @@ linux_find_partition (char *dev, unsigned long sector)
|
|||
|| strncmp (real_dev + 5, "sd", 2) == 0)
|
||||
&& real_dev[7] >= 'a' && real_dev[7] <= 'z')
|
||||
{
|
||||
p = real_dev + 8;
|
||||
p = real_dev + sizeof("/dev/hda")-1;
|
||||
format = "%d";
|
||||
}
|
||||
else if (strncmp (real_dev + 5, "rd/c", 4) == 0) /* dac960 */
|
||||
|
@ -266,6 +266,11 @@ linux_find_partition (char *dev, unsigned long sector)
|
|||
|
||||
format = "p%d";
|
||||
}
|
||||
else if (strncmp (real_dev + 5, "mmcblk", sizeof("mmcblk")-1) == 0)
|
||||
{
|
||||
p = real_dev + sizeof("/dev/mmcblk0")-1;
|
||||
format = "p%d";
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
|
||||
|
@ -675,6 +680,17 @@ get_os_disk (const char *os_dev)
|
|||
return path;
|
||||
}
|
||||
|
||||
/* If this is a MultiMediaCard (MMC). */
|
||||
if (strncmp ("mmcblk", p, sizeof ("mmcblk") - 1) == 0)
|
||||
{
|
||||
/* /dev/mmcblk[0-9]+(p[0-9]+)? */
|
||||
p = strchr (p, 'p');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
/* If this is an IDE, SCSI or Virtio disk. */
|
||||
if ((strncmp ("hd", p, 2) == 0
|
||||
|| strncmp ("vd", p, 2) == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue