aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/readconfig.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2011-11-25 15:54:48 +0000
committerMatt Fleming <matt.fleming@intel.com>2011-12-02 12:13:30 +0000
commit086d698c642f0b8901757a40cef56b04d05bf19c (patch)
tree1dfb9e228c0ce1febe7d08e35cef26bb8c1b71a6 /com32/elflink/ldlinux/readconfig.c
parent9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3 (diff)
downloadsyslinux-086d698c642f0b8901757a40cef56b04d05bf19c.tar.gz
syslinux-086d698c642f0b8901757a40cef56b04d05bf19c.tar.xz
syslinux-086d698c642f0b8901757a40cef56b04d05bf19c.zip
ldlinux: Add eprintf() to print to VGA and serial
printf() is used heavily in the ldlinux code but that only displays things on the VGA console, not on serial. Introduce eprintf(), which gives us the benefit of format strings but will also print to both VGA and serial. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/readconfig.c')
-rw-r--r--com32/elflink/ldlinux/readconfig.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/com32/elflink/ldlinux/readconfig.c b/com32/elflink/ldlinux/readconfig.c
index 3a6a3677..564cbeff 100644
--- a/com32/elflink/ldlinux/readconfig.c
+++ b/com32/elflink/ldlinux/readconfig.c
@@ -423,12 +423,12 @@ void print_labels(const char *prefix, size_t len)
{
struct menu_entry *me;
- printf("\n");
+ eprintf("\n");
for (me = all_entries; me; me = me->next ) {
if (!strncmp(prefix, me->label, len))
- printf(" %s", me->label);
+ eprintf(" %s", me->label);
}
- printf("\n");
+ eprintf("\n");
}
struct menu_entry *find_label(const char *str)
@@ -628,7 +628,7 @@ static int cat_file(const char *filename)
return -1;
while (fgets(line, sizeof(line), f) != NULL)
- printf("%s", line);
+ eprintf("%s", line);
fclose(f);
return 0;
@@ -685,7 +685,7 @@ void cat_help_file(int key)
return;
if (cm->fkeyhelp[fkey].textname) {
- printf("\n");
+ eprintf("\n");
cat_file(cm->fkeyhelp[fkey].textname);
}
}
@@ -1306,7 +1306,7 @@ do_include:
write_serial_str(copyright_str);
}
} else if (looking_at(p, "say")) {
- printf("%s\n", p + 4);
+ eprintf("%s\n", p+4);
} else if (looking_at(p, "path")) {
/* PATH-based lookup */
char *new_path, *_p;
@@ -1323,7 +1323,7 @@ do_include:
_p[len + new_len] = '\0';
PATH = _p;
} else
- printf("Failed to realloc PATH\n");
+ eprintf("Failed to realloc PATH\n");
}
}
}