aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/cli.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@linux.intel.com>2011-03-08 13:13:28 +0000
committerMatt Fleming <matt.fleming@linux.intel.com>2011-03-09 14:32:36 +0000
commitf1a65c520b2d7d8d15034d704c0c91842e7cbdc1 (patch)
tree90646c6de15f5ee37f87ebe7127b5e9aa46aa390 /com32/elflink/ldlinux/cli.c
parent1357b7e627064e7c498ae6107b141c3d2aed3a46 (diff)
downloadsyslinux-f1a65c520b2d7d8d15034d704c0c91842e7cbdc1.tar.gz
syslinux-f1a65c520b2d7d8d15034d704c0c91842e7cbdc1.tar.xz
syslinux-f1a65c520b2d7d8d15034d704c0c91842e7cbdc1.zip
Convert mp() to dprintf()
There's only one function required for printing debugging information and that is dprintf() - there is no need to invent another. dprintf() is also superior to mp() because it can be enabled/disabled on a per-file basis via the DEBUG symbol. Switch all users of mp() to dprintf() and leave them disabled (don't define the DEBUG) so we have a less verbose boot by default. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/cli.c')
-rw-r--r--com32/elflink/ldlinux/cli.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 551113f8..77d32cd2 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -13,6 +13,7 @@
#include <sys/exec.h>
#include <sys/module.h>
#include <core-elf.h>
+#include <dprintf.h>
#include "getkey.h"
#include "menu.h"
@@ -24,7 +25,7 @@ static struct list_head cli_history_head;
void clear_screen(void)
{
- //mp("enter");
+ //dprintf("enter");
fputs("\033e\033%@\033)0\033(B\1#0\033[?25l\033[2J", stdout);
}
@@ -34,7 +35,7 @@ int mygetkey(clock_t timeout)
clock_t tto, to;
int key;
- //mp("enter");
+ //dprintf("enter");
if (!totaltimeout)
return get_key(stdin, timeout);
@@ -52,13 +53,13 @@ int mygetkey(clock_t timeout)
totaltimeout -= t;
if (key != KEY_NONE) {
- //mp("get key 0x%x", key);
+ //dprintf("get key 0x%x", key);
return key;
}
if (timeout) {
if (timeout <= t) {
- //mp("timeout");
+ //dprintf("timeout");
return KEY_NONE;
}
@@ -375,7 +376,7 @@ void process_command(const char *cmd, bool history)
list_add(&(comm->list), &cli_history_head);
}
- // mp("raw cmd = %s", cmd);
+ // dprintf("raw cmd = %s", cmd);
strcpy(temp_cmd, cmd);
module_name = strtok(cmd, COMMAND_DELIM);
len_mn = strlen(module_name);
@@ -383,7 +384,7 @@ void process_command(const char *cmd, bool history)
if (!strcmp(module_name + len_mn - 4, ".c32")) {
if (module_find(module_name) != NULL) {
/* make module re-enterable */
- // mp("Module %s is already running");
+ // dprintf("Module %s is already running");
}
do {
argv[0] = module_name;