diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-26 14:12:00 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-02-26 14:12:00 -0800 |
commit | ef74f1b6ead6ee8ab30bf2585a1e5ab3ea329a2c (patch) | |
tree | e5a525bf346a115c0e0eeff7eee907fed20878ef /core | |
parent | 3d70641c998fa051df83b55e51f55ba4ae16ddd6 (diff) | |
download | syslinux-ef74f1b6ead6ee8ab30bf2585a1e5ab3ea329a2c.tar.gz |
bios: Fix lowmem check
The lowmem check was backwards and would report error when there
wasn't any. This was missed because the Ctrl key check was *also*
backwards and so the check would only be done when Ctrl was held down.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/init.c b/core/init.c index f286622f..41e5fea1 100644 --- a/core/init.c +++ b/core/init.c @@ -21,7 +21,7 @@ static inline void check_escapes(void) KbdFlags = oreg.eax.b[0]; /* Ctrl->skip 386 check */ - if (oreg.eax.b[0] & 0x04) { + if (!(oreg.eax.b[0] & 0x04)) { /* * Now check that there is sufficient low (DOS) memory * @@ -35,7 +35,7 @@ static inline void check_escapes(void) mem = ((uint32_t)__lowmem_heap) + min_lowmem_heap + 1023; mem = mem >> 10; - if (mem < oreg.eax.w[0]) { + if (oreg.eax.w[0] < mem) { char buf[256]; snprintf(buf, sizeof(buf), |