From: Matt Fleming Date: Fri, 27 May 2011 16:57:32 +0000 (+0100) Subject: ldlinux: Support "kbdmap" X-Git-Tag: syslinux-5.00-pre1~42^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8ce3aad1f66e69d66c7f04834c91f181f160cf9;p=platform%2Fupstream%2Fsyslinux.git ldlinux: Support "kbdmap" Add support to the ldlinux config file parser for the "kbdmap" directive. Signed-off-by: Matt Fleming --- 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