+2011-01-12 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * util/ieee1275/ofpath.c (grub_util_devname_to_ofpath): Use the
+ realpath'ed device string.
+ Handle floppy (somewhat).
+ Issue error in unknown case rather than garbage.
+ Reported by: Axel Beckert.
+
2011-01-12 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub.d/00_header.in (load_video): Handle the case when no video
if (! name_buf)
grub_util_error ("cannot get the real path of `%s'", devname);
- device = get_basename (devname);
- devnode = strip_trailing_digits (devname);
+ device = get_basename (name_buf);
+ devnode = strip_trailing_digits (name_buf);
devicenode = strip_trailing_digits (device);
ofpath = xmalloc (OF_PATH_MAX);
else if (device[0] == 'v' && device[1] == 'd' && device[2] == 'i'
&& device[3] == 's' && device[4] == 'k')
of_path_of_vdisk(ofpath, name_buf, device, devnode, devicenode);
+ else if (device[0] == 'f' && device[1] == 'd'
+ && device[2] == '0' && device[3] == '\0')
+ /* All the models I've seen have a devalias "floppy".
+ New models have no floppy at all. */
+ strcpy (ofpath, "floppy");
+ else
+ grub_util_error ("unknown device type %s\n", device);
free (devnode);
free (devicenode);