summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 */