From 365fd745d62e9fdc43b22a0a1916c595749eb575 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 23 Sep 2013 21:12:41 +0200 Subject: 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. --- sys/src/boot/pc/fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3