2005-03-18 Yoshinori K. Okuji <okuji@enbug.org>
* fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media descriptor. This is ported from GRUB Legacy. * gencmdlist.sh: Added an extra semicolon to make it work with old sed versions. Reported by Robert Bihlmeyer <robbe@orcus.priv.at>.
This commit is contained in:
parent
5822ff87a2
commit
46b3b8a540
4 changed files with 18 additions and 3 deletions
8
fs/fat.c
8
fs/fat.c
|
@ -1,7 +1,7 @@
|
|||
/* fat.c - FAT filesystem */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2000,2001,2002,2003,2004 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -288,7 +288,11 @@ grub_fat_mount (grub_disk_t disk)
|
|||
magic = 0x0f00;
|
||||
}
|
||||
|
||||
if (first_fat != (magic | bpb.media))
|
||||
/* Ignore the 3rd bit, because some BIOSes assigns 0xF0 to the media
|
||||
descriptor, even if it is a so-called superfloppy (e.g. an USB key).
|
||||
The check may be too strict for this kind of stupid BIOSes, as
|
||||
they overwrite the media descriptor. */
|
||||
if ((first_fat | 0x8) != (magic | bpb.media | 0x8))
|
||||
goto fail;
|
||||
|
||||
/* Start from the root directory. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue