disable check on jump distance. this might not be a bootable fat or a pc. see ecma-107 standard. this is important for sd cards for digital cameras. Reference: /n/sources/patch/applied/dossrvcamera Date: Sat Oct 4 21:11:24 CES 2008 Signed-off-by: quanstro@quanstro.net --- /sys/src/cmd/dossrv/dossubs.c Sat Oct 4 21:10:17 2008 +++ /sys/src/cmd/dossrv/dossubs.c Sat Oct 4 21:10:14 2008 @@ -21,9 +21,16 @@ /* * Check if the jump displacement (magic[1]) is too short for a FAT. + * + * check now omitted due to digital cameras that use a 0 jump. + * the ecma-107 standard says this is okay and that interoperable fat + * implementations shouldn't assume this: + * http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-107.pdf, page 11 */ - if(buf[0] == 0xEB && buf[2] == 0x90 && buf[1] >= 0x30) + if(buf[0] == 0xEB && buf[2] == 0x90 /*&& buf[1] >= 0x30*/) return 1; + if(chatty) + fprint(2, "bad sig %.2ux %.2ux %.2uxn", buf[0], buf[1], buf[2]); return 0; } @@ -101,6 +108,8 @@ bp->fatsize = GLONG(b32->fatsize32); if(bp->fatsize == 0){ putsect(p); + if(chatty) + fprint(2, "fatsize 0\n"); return -1; } bp->dataaddr = bp->fataddr + bp->nfats*bp->fatsize;