Move OS-specific driver configuration to grub_util_fd_open. This
moves OS-dependent parts from kern/emu/hostdisk.c to grub-core/osdep/*/hostdisk.c.
This commit is contained in:
parent
f7676b7016
commit
caca1c70cf
13 changed files with 101 additions and 93 deletions
|
@ -86,7 +86,6 @@ grub_util_part_to_disk (const char *os_dev, struct stat *st,
|
|||
strerror (errno));
|
||||
return xstrdup (os_dev);
|
||||
}
|
||||
/* We don't call configure_device_driver since this isn't a floppy device name. */
|
||||
if (ioctl (fd, DIOCGWEDGEINFO, &dkw) == -1)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_DEVICE,
|
||||
|
@ -156,7 +155,7 @@ grub_util_find_partition_start_os (const char *dev)
|
|||
struct disklabel label;
|
||||
int p_index;
|
||||
|
||||
fd = open (dev, O_RDONLY);
|
||||
fd = grub_util_fd_open (dev, O_RDONLY);
|
||||
if (fd == -1)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot open `%s': %s"),
|
||||
|
@ -165,7 +164,6 @@ grub_util_find_partition_start_os (const char *dev)
|
|||
}
|
||||
|
||||
# if defined(__NetBSD__)
|
||||
configure_device_driver (fd);
|
||||
/* First handle the case of disk wedges. */
|
||||
if (ioctl (fd, DIOCGWEDGEINFO, &dkw) == 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue