]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2005-03-15 Yoshinori K. Okuji <okuji@enbug.org>
authorokuji <okuji@localhost>
Tue, 15 Mar 2005 16:54:24 +0000 (16:54 +0000)
committerokuji <okuji@localhost>
Tue, 15 Mar 2005 16:54:24 +0000 (16:54 +0000)
  * stage2/fsys_fat.c (fat_mount): Ignore the 3rd bit of a media
  descriptor, because some BIOSes overwrite this value, according
  to the storage mode (e.g. USB Floppy or USB HDD).

ChangeLog
docs/grub.8
docs/mbchk.1
stage2/fsys_fat.c

index 0f030b94202a1cd55a5f7e43ed703d20dc583d13..b47780c52affffcf5aeeb01852874e2aded419fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-03-15  Yoshinori K. Okuji  <okuji@enbug.org>
+
+       * stage2/fsys_fat.c (fat_mount): Ignore the 3rd bit of a media
+       descriptor, because some BIOSes overwrite this value, according
+       to the storage mode (e.g. USB Floppy or USB HDD).
+
 2005-02-16  Yoshinori K. Okuji  <okuji@enbug.org>
 
        * grub/asmstub.c (grub_stage2): Remove the attribute `volatile'
index fcd2fb913e722b9f2418217caf75dce40eac0437..577b44a45e730c5087704e0844f8181ebbc7657b 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.23.
-.TH GRUB "8" "February 2005" "grub (GNU GRUB 0.96)" FSF
+.TH GRUB "8" "March 2005" "grub (GNU GRUB 0.96)" FSF
 .SH NAME
 grub \- the grub shell
 .SH SYNOPSIS
index e673c3c95864f8b0b54db5cf6a8b14b19c25954e..16b1a36a6294e1fb578d9710dd69e430bb28d724 100644 (file)
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.23.
-.TH MBCHK "1" "February 2005" "mbchk (GNU GRUB 0.96)" FSF
+.TH MBCHK "1" "March 2005" "mbchk (GNU GRUB 0.96)" FSF
 .SH NAME
 mbchk \- check the format of a Multiboot kernel
 .SH SYNOPSIS
index c97eb3c161e18342e90d2db1a245186fa02e6c13..f40e658d9c5da783f14b57e2e2c09fffc609bb04 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2000, 2001   Free Software Foundation, Inc.
+ *  Copyright (C) 2000,2001,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
@@ -149,8 +149,7 @@ fat_mount (void)
          FAT_SUPER->clust_eof_marker = 0xff8;
        }
     }
-  
-  
+
   /* Now do some sanity checks */
   
   if (FAT_CVT_U16(bpb.bytes_per_sect) != (1 << FAT_SUPER->sectsize_bits)
@@ -184,7 +183,11 @@ fat_mount (void)
       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))
     return 0;
 
   FAT_SUPER->cached_fat = - 2 * FAT_CACHE_SIZE;