From: hpa Date: Tue, 3 Feb 2004 06:11:38 +0000 (+0000) Subject: Correct syslinux detection X-Git-Tag: syslinux-3.11~454 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad91206f3879f8584974032d1c51319a9ed946bf;p=platform%2Fupstream%2Fsyslinux.git Correct syslinux detection --- diff --git a/menu/syslinux.c b/menu/syslinux.c index 67a1585..ebb72b5 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 87b7979..ef73d3a 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 */