FAT32 detection fixes

git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@347 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2002-02-07 22:30:58 +00:00
parent 3644d8c222
commit 9502a97d91
1 changed files with 4 additions and 2 deletions

View File

@ -448,6 +448,7 @@ unsigned getextdrivespace(void *drivename, void *buf, unsigned buf_size);
"mov ax, 0x7303" \ "mov ax, 0x7303" \
"push ds" \ "push ds" \
"pop es" \ "pop es" \
"stc" \
"int 0x21" \ "int 0x21" \
"mov ax, 0" \ "mov ax, 0" \
"adc ax, ax" \ "adc ax, ax" \
@ -483,7 +484,7 @@ unsigned getextdrivespace(void *drivename, void *buf, unsigned buf_size)
regs.x.cx = buf_size; regs.x.cx = buf_size;
int86x(0x21, &regs, &regs, &sregs); int86x(0x21, &regs, &regs, &sregs);
return regs.x.cflag; return regs.x.ax == 0x7300 || regs.x.cflag;
} }
#endif #endif
@ -497,7 +498,8 @@ VOID put_boot(COUNT drive, BYTE * bsFile, BOOL both)
#endif #endif
int fs; int fs;
char drivename[] = "A:\\"; char drivename[] = "A:\\";
unsigned char x[0x40]; static unsigned char x[0x40]; /* we make this static to be 0 by default -
this avoids FAT misdetections */
unsigned total_clusters; unsigned total_clusters;
#ifdef DEBUG #ifdef DEBUG