From c8c069367f2dcfb25643ab5d89e3110f7d31f396 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Thu, 7 Apr 2011 15:31:22 +0200 Subject: [PATCH] Allow skipping font setting In some cases, we may want to keep the font which is built in the kernel instead of setting a new one. Allow user to disable setting a new one by giving an empty one. Signed-off-by: Marc-Antoine Perennou --- src/vconsole-setup.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vconsole-setup.c b/src/vconsole-setup.c index 67fb7b6..7b5822d 100644 --- a/src/vconsole-setup.c +++ b/src/vconsole-setup.c @@ -424,8 +424,9 @@ int main(int argc, char **argv) { disable_utf8(fd); if (load_keymap(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 && - load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) - r = EXIT_SUCCESS; + (strlen(vc_font) == 0 || + load_font(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)) + r = EXIT_SUCCESS; finish: if (keymap_pid > 0) -- 1.7.5.rc0.116.g44bc5.dirty