aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/readconfig.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-05-27 17:57:05 +0100
committerMatt Fleming <matt.fleming@linux.intel.com>2011-06-07 20:02:56 +0100
commitc3d49b20017bb441060536a3422719bdd66255ac (patch)
treeb87593f88b3b062d72d272f4111cd086ac217fb2 /com32/elflink/ldlinux/readconfig.c
parent26c1f437deb4b1ebe1df75e3613f24da62b73ae1 (diff)
downloadsyslinux-c3d49b20017bb441060536a3422719bdd66255ac.tar.gz
syslinux-c3d49b20017bb441060536a3422719bdd66255ac.tar.xz
syslinux-c3d49b20017bb441060536a3422719bdd66255ac.zip
ldlinux: Support "font"
Add support for parsing the "font" config directive to ldlinux. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/readconfig.c')
-rw-r--r--com32/elflink/ldlinux/readconfig.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 906cbe05..61da2ff3 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -727,6 +727,7 @@ static inline void io_delay(void)
}
extern void get_msg_file(void);
+extern void loadfont(void);
extern char syslinux_banner[];
extern char copyright_str[];
@@ -1135,7 +1136,25 @@ do_include:
refstr_put(filename);
} else if (looking_at(p, "font")) {
+ 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(&reg, 0, sizeof(reg));
+ reg.edi.w[0] = OFFS_WRT(KernelName, 0);
+ call16(core_open, &reg, &reg);
+ if (!(reg.eflags.l & EFLAGS_ZF))
+ call16(loadfont, &reg, NULL);
+ else
+ printf("File not found\n");
+
+ refstr_put(filename);
} else if (looking_at(p, "kbdmap")) {
}