linux/getroot: Handle rssd storage device names

The Micron PCIe SSDs Linux driver (mtip32xx) exposes block devices
as /dev/rssd[a-z]+[0-9]*. Add support for these rssd device names.

Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Peter Jones 2020-03-04 12:58:40 +01:00 committed by Daniel Kiper
parent 87049f9716
commit ea04f131a4

View file

@ -921,6 +921,19 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
return path; return path;
} }
/* If this is an rssd device. */
if ((strncmp ("rssd", p, 4) == 0) && p[4] >= 'a' && p[4] <= 'z')
{
char *pp = p + 4;
while (*pp >= 'a' && *pp <= 'z')
pp++;
if (*pp)
*is_part = 1;
/* /dev/rssd[a-z]+[0-9]* */
*pp = '\0';
return path;
}
/* If this is a loop device */ /* If this is a loop device */
if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9') if ((strncmp ("loop", p, 4) == 0) && p[4] >= '0' && p[4] <= '9')
{ {