summaryrefslogtreecommitdiff
path: root/dos
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-11-11 15:52:37 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-11-11 15:52:37 -0800
commite79ba125c9c8eb3816d164d86b5264b21868f7af (patch)
treefe0ebb757b858975f193424815a93f450e0a0c68 /dos
parent32167a5ccce13f0931b015011e44420fb838f7dd (diff)
downloadsyslinux-e79ba125c9c8eb3816d164d86b5264b21868f7af.tar.gz
dos: DOS version 7.10 is 0x070a, not 0x0710...
Fix DOS version 7.10 (first FAT32-capable version) check. Perhaps we should just call the FAT32 calls blindly and fall back to the old calls if they fail? Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'dos')
-rw-r--r--dos/syslinux.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dos/syslinux.c b/dos/syslinux.c
index 1cdf418b..d054c4ce 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -171,7 +171,7 @@ void write_device(int drive, const void *buf, size_t nsecs, unsigned int sector)
dio.bufoffs = (uintptr_t) buf;
dio.bufseg = data_segment();
- if (dos_version >= 0x0710) {
+ if (dos_version >= 0x070a) {
asm volatile("int $0x21 ; setc %0"
: "=bcdm" (err), "=a" (errnum)
: "a" (0x7305), "b" (&dio), "c" (-1), "d" (drive),
@@ -204,7 +204,7 @@ void read_device(int drive, const void *buf, size_t nsecs, unsigned int sector)
dio.bufoffs = (uintptr_t) buf;
dio.bufseg = data_segment();
- if (dos_version >= 0x0710) {
+ if (dos_version >= 0x070a) {
asm volatile("int $0x21 ; setc %0"
: "=bcdm" (err), "=a" (errnum)
: "a" (0x7305), "b" (&dio), "c" (-1), "d" (drive),
@@ -411,7 +411,7 @@ static int do_lock(uint8_t level)
uint8_t err;
#if 0
/* DOS 7.10 = Win95 OSR2 = first version with FAT32 */
- uint16_t lock_call = (dos_version >= 0x0710) ? 0x484A : 0x084A;
+ uint16_t lock_call = (dos_version >= 0x070a) ? 0x484A : 0x084A;
#else
uint16_t lock_call = 0x084A; /* MSDN says this is OK for all filesystems */
#endif
@@ -486,7 +486,7 @@ void unlock_device(int level)
#if 0
/* DOS 7.10 = Win95 OSR2 = first version with FAT32 */
- unlock_call = (dos_version >= 0x0710) ? 0x486A : 0x086A;
+ unlock_call = (dos_version >= 0x070a) ? 0x486A : 0x086A;
#else
unlock_call = 0x086A; /* MSDN says this is OK for all filesystems */
#endif