aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-12-05 09:20:38 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-12-05 21:18:18 +0000
commita79ceb45909434d392aacbb92eb2dfa738479783 (patch)
tree8441373f05060de1c2e31732a919fa2affe9110d
parent2cf4a7e6d99933cf84525bc07310122792f9a6eb (diff)
downloadsyslinux-a79ceb45909434d392aacbb92eb2dfa738479783.tar.gz
syslinux-a79ceb45909434d392aacbb92eb2dfa738479783.tar.xz
syslinux-a79ceb45909434d392aacbb92eb2dfa738479783.zip
core: Fix 'NoHalt'
Use the same variable in idle.c and ldlinux.c32. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r--com32/elflink/ldlinux/readconfig.c4
-rw-r--r--core/idle.c2
-rw-r--r--core/idle.inc2
3 files changed, 3 insertions, 5 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 705ffa8a..7411fcaf 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -80,7 +80,7 @@ short includelevel = 1; //nesting level
short defaultlevel = 0; //the current level of default
short vkernel = 0; //have we seen any "label" statements?
short displaycon = 1; //conio.inc
-short nohalt = 1; //idle.inc
+extern short NoHalt; //idle.c
const char *default_cmd = NULL; //"default" command line
const char *onerror = NULL; //"onerror" command line
@@ -1181,7 +1181,7 @@ do_include:
} else if (looking_at(p, "nocomplete")) {
nocomplete = atoi(skipspace(p + 10));
} else if (looking_at(p, "nohalt")) {
- nohalt = atoi(skipspace(p + 8));
+ NoHalt = atoi(skipspace(p + 8));
} else if (looking_at(p, "onerror")) {
refstr_put(m->onerror);
m->onerror = refstrdup(skipspace(p + 7));
diff --git a/core/idle.c b/core/idle.c
index 3f57393b..137e0ea7 100644
--- a/core/idle.c
+++ b/core/idle.c
@@ -25,7 +25,7 @@
#define TICKS_TO_IDLE 4 /* Also in idle.inc */
extern uint32_t _IdleTimer;
-extern uint16_t NoHalt;
+uint16_t NoHalt = 0;
int (*idle_hook_func)(void);
diff --git a/core/idle.inc b/core/idle.inc
index c93d1773..09a3771e 100644
--- a/core/idle.inc
+++ b/core/idle.inc
@@ -74,8 +74,6 @@ do_idle:
alignz 4
global _IdleTimer
_IdleTimer dd 0
- global NoHalt
-NoHalt dw 0
hlt_err db 'ERROR: idle with IF=0', CR, LF, 0