summaryrefslogtreecommitdiff
path: root/memdisk/setup.c
diff options
context:
space:
mode:
authorhpa <hpa>2005-03-08 18:39:32 +0000
committerhpa <hpa>2005-03-08 18:39:32 +0000
commitc19f90a3e55888fa7ff6f6022fc69465e952e99d (patch)
tree87bd1210e839787cccdaafb50e6a84e58e180964 /memdisk/setup.c
parentd59d2c187dac7a3d632293af16ff690e7a38dbc0 (diff)
downloadsyslinux-c19f90a3e55888fa7ff6f6022fc69465e952e99d.tar.gz
Actually use memcmp() for the DOSEMU comparison; we can't seem to get
it right any other way...
Diffstat (limited to 'memdisk/setup.c')
-rw-r--r--memdisk/setup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 0832a266..f8de652a 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -408,8 +408,7 @@ const struct geometry *get_disk_image_geometry(uint32_t where, uint32_t size)
/* Do we have a DOSEMU header? */
memcpy(&dosemu, (char *)where+hd_geometry.offset, sizeof dosemu);
- if ( ((unsigned long *)dosemu.magic)[0] == FOUR('D','O','S','E') &&
- (((unsigned long *)dosemu.magic)[1] & 0xffffff) == FOUR('M','U',0,0) ) {
+ if ( !memcmp("DOSEMU", dosemu.magic, 7) ) {
/* Always a hard disk unless overruled by command-line options */
hd_geometry.driveno = 0x80;
hd_geometry.type = 0;