From 9502a97d91a3865117a2c2dc8f053ec51ea65c12 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Thu, 7 Feb 2002 22:30:58 +0000 Subject: [PATCH] FAT32 detection fixes git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@347 6ac86273-5f31-0410-b378-82cca8765d1b --- sys/sys.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/sys.c b/sys/sys.c index fdbc2c6..be66869 100644 --- a/sys/sys.c +++ b/sys/sys.c @@ -448,6 +448,7 @@ unsigned getextdrivespace(void *drivename, void *buf, unsigned buf_size); "mov ax, 0x7303" \ "push ds" \ "pop es" \ + "stc" \ "int 0x21" \ "mov ax, 0" \ "adc ax, ax" \ @@ -483,7 +484,7 @@ unsigned getextdrivespace(void *drivename, void *buf, unsigned buf_size) regs.x.cx = buf_size; int86x(0x21, ®s, ®s, &sregs); - return regs.x.cflag; + return regs.x.ax == 0x7300 || regs.x.cflag; } #endif @@ -497,7 +498,8 @@ VOID put_boot(COUNT drive, BYTE * bsFile, BOOL both) #endif int fs; 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; #ifdef DEBUG