aboutsummaryrefslogtreecommitdiffstats
path: root/menu
diff options
context:
space:
mode:
authorhpa <hpa>2004-02-03 06:11:38 +0000
committerhpa <hpa>2004-02-03 06:11:38 +0000
commitad91206f3879f8584974032d1c51319a9ed946bf (patch)
tree582c6ef6fd2b32aafca65b388191d255f9662f28 /menu
parent48448cdfab4f2c79e7e8866d423d3b191eab4c60 (diff)
downloadsyslinux-elf-ad91206f3879f8584974032d1c51319a9ed946bf.tar.gz
syslinux-elf-ad91206f3879f8584974032d1c51319a9ed946bf.tar.xz
syslinux-elf-ad91206f3879f8584974032d1c51319a9ed946bf.zip
Correct syslinux detection
Diffstat (limited to 'menu')
-rw-r--r--menu/syslinux.c9
-rw-r--r--menu/syslinux.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/menu/syslinux.c b/menu/syslinux.c
index 67a1585e..ebb72b5b 100644
--- a/menu/syslinux.c
+++ b/menu/syslinux.c
@@ -17,14 +17,17 @@ static inline int asm_issyslinux(void)
{
unsigned long eax, ebx, ecx, edx;
- asm("movb $0x30,%%ah ; int $0x21"
- : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx));
+ eax = 0x00003000;
+ ebx = ecx = edx = 0xFFFFFFFF;
+
+ asm("int $0x21"
+ : "+a" (eax), "+b" (ebx), "+c" (ecx), "+d" (edx));
return (eax == 0x53590000) && (ebx == 0x534c0000) &&
(ecx == 0x494e0000) && (edx == 0x55580000);
}
-char issyslinux(void)
+int issyslinux(void)
{
return asm_issyslinux();
}
diff --git a/menu/syslinux.h b/menu/syslinux.h
index 87b79798..ef73d3a4 100644
--- a/menu/syslinux.h
+++ b/menu/syslinux.h
@@ -4,7 +4,7 @@
extern int syslinux; /* Syslinux flag */
-char issyslinux(void); /* Check if syslinux is running */
+int issyslinux(void); /* Check if syslinux is running */
void runcommand(const char *cmd); /* Run specified command */