summaryrefslogtreecommitdiff
path: root/sys/src/boot
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-09-23 21:12:41 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-09-23 21:12:41 +0200
commit365fd745d62e9fdc43b22a0a1916c595749eb575 (patch)
tree7cb88d3ba1ef8a6d7dd8597612e159747e4a78d2 /sys/src/boot
parentb4cdfc6c5517390d6be05b2c01e56bacc9e85ea8 (diff)
9bootfat: only check for fat at block 0 on floppy drives (thanks aap)
smart boot manager has a "FAT" signature in its mbr causing 9bootfat to "detect" it as a fat filesystem and then fails to find plan9.ini. there shouldnt be a fat filesystem on harddrives at block 0, only on floppy drives. but some bioses use floppy drive numbers for usb harddrives so still check for a partition table. thanks aap for debugging this.
Diffstat (limited to 'sys/src/boot')
-rw-r--r--sys/src/boot/pc/fat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/boot/pc/fat.c b/sys/src/boot/pc/fat.c
index 7b90234b4..99218d155 100644
--- a/sys/src/boot/pc/fat.c
+++ b/sys/src/boot/pc/fat.c
@@ -339,7 +339,7 @@ findfat(Fat *fat, int drive, ulong xbase, ulong lba)
return -1;
if(buf[0x1fe] != 0x55 || buf[0x1ff] != 0xAA)
return -1;
- if(lba == 0){
+ if(lba == 0 && (drive & 0x80) == 0){ /* floppy */
fat->drive = drive;
fat->partlba = 0;
if(!conffat(fat, buf))