char *open_path;
char *grub_devpath;
int is_boot;
- int is_cdrom;
+ int is_removable;
/* Pointer to shortest available name on nodes representing canonical names,
otherwise NULL. */
const char *shortest;
}
static int
-check_string_cdrom (const char *str)
+check_string_removable (const char *str)
{
const char *ptr = grub_strrchr (str, '/');
ptr++;
else
ptr = str;
- return (grub_strncmp (ptr, "cdrom", 5) == 0);
+ return (grub_strncmp (ptr, "cdrom", 5) == 0 || grub_strncmp (ptr, "fd", 2) == 0);
}
static struct ofdisk_hash_ent *
{
p->shortest = p->devpath;
p->grub_shortest = p->grub_devpath;
- if (check_string_cdrom (devpath))
- p->is_cdrom = 1;
+ if (check_string_removable (devpath))
+ p->is_removable = 1;
return p;
}
else
grub_free (curcan);
- if (check_string_cdrom (devpath) || check_string_cdrom (curcan))
- pcan->is_cdrom = 1;
+ if (check_string_removable (devpath) || check_string_removable (curcan))
+ pcan->is_removable = 1;
if (!pcan)
grub_errno = GRUB_ERR_NONE;
}
}
- if (!ent->is_boot && ent->is_cdrom)
+ if (!ent->is_boot && ent->is_removable)
continue;
if (hook (ent->grub_shortest, hook_data))