2010-09-26 Robert Millan <rmh@gnu.org>
Build fixes for GNU/kFreeBSD. * Makefile.util.def: Add `$(LIBZFS) $(LIBNVPAIR)' library dependencies to programs that require ZFS conversion. * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Support kernels that don't have FLOPPY_MAJOR.
This commit is contained in:
parent
96510fafd2
commit
f913083640
3 changed files with 31 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
/* hostdisk.c - emulate biosdisk */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004,2006,2007,2008,2009 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1999,2000,2001,2002,2003,2004,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -1627,7 +1627,16 @@ grub_util_biosdisk_is_floppy (grub_disk_t disk)
|
|||
return 1;
|
||||
#endif
|
||||
|
||||
#if defined(FLOPPY_MAJOR)
|
||||
if (major(st.st_rdev) == FLOPPY_MAJOR)
|
||||
#else
|
||||
/* Some kernels (e.g. kFreeBSD) don't have a static major number
|
||||
for floppies, but they still use a "fd[0-9]" pathname. */
|
||||
if (map[disk->id].device[5] == 'f'
|
||||
&& map[disk->id].device[6] == 'd'
|
||||
&& map[disk->id].device[7] >= '0'
|
||||
&& map[disk->id].device[7] <= '9')
|
||||
#endif
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue