[syslinux:elflink] core: Fix 'NoHalt'

syslinux-bot for Matt Fleming matt.fleming at intel.com
Thu Dec 6 11:54:09 PST 2012


Commit-ID:  a79ceb45909434d392aacbb92eb2dfa738479783
Gitweb:     http://www.syslinux.org/commit/a79ceb45909434d392aacbb92eb2dfa738479783
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Wed, 5 Dec 2012 09:20:38 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Wed, 5 Dec 2012 21:18:18 +0000

core: Fix 'NoHalt'

Use the same variable in idle.c and ldlinux.c32.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/elflink/ldlinux/readconfig.c | 4 ++--
 core/idle.c                        | 2 +-
 core/idle.inc                      | 2 --
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 705ffa8..7411fca 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 3f57393..137e0ea 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 c93d177..09a3771 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 
 


More information about the Syslinux-commits mailing list