Limit NVMe of_path_of_nvme to just SPARC hardware for now. It has been
found that non-Open Firmware hardware platforms can some how access
this function.
Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
return ret;
}
+#ifdef __sparc__
static char *
of_path_of_nvme(const char *sys_devname __attribute__((unused)),
const char *device,
free (sysfs_path);
return of_path;
}
+#endif
static int
vendor_is_ATA(const char *path)
/* All the models I've seen have a devalias "floppy".
New models have no floppy at all. */
ofpath = xstrdup ("floppy");
+#ifdef __sparc__
else if (device[0] == 'n' && device[1] == 'v' && device[2] == 'm'
&& device[3] == 'e')
ofpath = of_path_of_nvme (name_buf, device, devnode, devicenode);
+#endif
else
{
grub_util_warn (_("unknown device type %s"), device);