aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2001-12-14 08:21:36 +0000
committerhpa <hpa>2001-12-14 08:21:36 +0000
commit7d14670cf72185fe74cbc7d7c98cfdd447ea41b2 (patch)
tree17f32178ab98692b9c2f27c2cca0c3eb1f5d9cf0
parenta07e4a01ba45608500e95054fa06a12852a29f96 (diff)
downloadsyslinux-7d14670cf72185fe74cbc7d7c98cfdd447ea41b2.tar.gz
syslinux-7d14670cf72185fe74cbc7d7c98cfdd447ea41b2.tar.xz
syslinux-7d14670cf72185fe74cbc7d7c98cfdd447ea41b2.zip
Use the correct drive number variable, please...
-rw-r--r--memdisk/setup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 04c2aaac..530dc0c7 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -387,7 +387,6 @@ uint32_t setup(void)
uint32_t driverptr, driveraddr;
uint16_t dosmem_k;
uint32_t stddosmem;
- uint8_t driveno = 0;
uint8_t status;
uint16_t exitcode;
const struct geometry *geometry;
@@ -472,7 +471,7 @@ uint32_t setup(void)
if ( low_mem == (15 << 20) ) {
/* lowmem maxed out */
uint32_t int1588mem = (high_mem >> 10)+(low_mem >> 10);
- pptr->memint1588 = (int1588mem > 0xffff) ? 0xffff: int1588mem;
+ pptr->memint1588 = (int1588mem > 0xffff) ? 0xffff : int1588mem;
} else {
pptr->memint1588 = low_mem >> 10;
}
@@ -536,7 +535,7 @@ uint32_t setup(void)
"popw %%es ; "
"setc %0 "
: "=rm" (status), "=a" (exitcode)
- : "d" ((uint16_t)driveno)
+ : "d" ((uint16_t)geometry->driveno)
: "ebx", "ecx", "edx", "esi", "edi", "ebp");
if ( status ) {
@@ -547,5 +546,5 @@ uint32_t setup(void)
puts("Booting...\n");
/* On return the assembly code will jump to the boot vector */
- return driveno;
+ return geometry->driveno;
}