[syslinux:elflink] ldlinux: Support "kbdmap"
syslinux-bot for Matt Fleming
matt.fleming at linux.intel.com
Tue Jul 12 20:03:31 PDT 2011
Commit-ID: d8ce3aad1f66e69d66c7f04834c91f181f160cf9
Gitweb: http://syslinux.zytor.com/commit/d8ce3aad1f66e69d66c7f04834c91f181f160cf9
Author: Matt Fleming <matt.fleming at linux.intel.com>
AuthorDate: Fri, 27 May 2011 17:57:32 +0100
Committer: Matt Fleming <matt.fleming at linux.intel.com>
CommitDate: Tue, 7 Jun 2011 20:02:56 +0100
ldlinux: Support "kbdmap"
Add support to the ldlinux config file parser for the "kbdmap"
directive.
Signed-off-by: Matt Fleming <matt.fleming at linux.intel.com>
---
com32/elflink/ldlinux/readconfig.c | 19 +++++++++++++++++++
core/conio.inc | 1 +
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 61da2ff..408fe03 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -728,6 +728,7 @@ static inline void io_delay(void)
extern void get_msg_file(void);
extern void loadfont(void);
+extern void loadkeys(void);
extern char syslinux_banner[];
extern char copyright_str[];
@@ -1156,7 +1157,25 @@ do_include:
refstr_put(filename);
} else if (looking_at(p, "kbdmap")) {
+ com32sys_t reg;
+ char *filename, *dst = KernelName;
+ size_t len = FILENAME_MAX - 1;
+
+ filename = refstrdup(skipspace(p + 4));
+
+ while (len-- && not_whitespace(*filename))
+ *dst++ = *filename++;
+ *dst = '\0';
+ memset(®, 0, sizeof(reg));
+ reg.edi.w[0] = OFFS_WRT(KernelName, 0);
+ call16(core_open, ®, ®);
+ if (!(reg.eflags.l & EFLAGS_ZF))
+ call16(loadkeys, ®, NULL);
+ else
+ printf("File not found\n");
+
+ refstr_put(filename);
}
/*
* subset 2: pc_setint16
diff --git a/core/conio.inc b/core/conio.inc
index 46183fb..ec2aa2a 100644
--- a/core/conio.inc
+++ b/core/conio.inc
@@ -26,6 +26,7 @@
;
section .text16
+ global loadkeys
loadkeys:
mov cx,256
mov di,trackbuf
More information about the Syslinux-commits
mailing list