aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt/hdt-cli.c
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-04 22:58:09 -0800
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-11-04 22:58:09 -0800
commita0d6887d5f04118069705e3d18bc55b04027ffc4 (patch)
tree4b2342dc3d13af60adcf91a1bf34ef33c3428107 /com32/hdt/hdt-cli.c
parent2b733a8ab4386ec7374dc45dc9b11a54f4200b02 (diff)
downloadsyslinux-a0d6887d5f04118069705e3d18bc55b04027ffc4.tar.gz
syslinux-a0d6887d5f04118069705e3d18bc55b04027ffc4.tar.xz
syslinux-a0d6887d5f04118069705e3d18bc55b04027ffc4.zip
hdt: add debug option
Pass 'debug' on the kernel command line for the output to be more verbose. Making hdt quiet is really helpful in auto mode, when a lot of information is flowing. This fixes #21. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt/hdt-cli.c')
-rw-r--r--com32/hdt/hdt-cli.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c
index f395260f..518f0751 100644
--- a/com32/hdt/hdt-cli.c
+++ b/com32/hdt/hdt-cli.c
@@ -755,7 +755,8 @@ void start_auto_mode(struct s_hardware *hardware)
int nb_commands=0;
char *commands[MAX_NB_AUTO_COMMANDS];
- more_printf("Entering Auto mode\n");
+ if (debug)
+ more_printf("\nEntering Auto mode\n");
/* Protecting the auto_label from the strtok modifications */
char *temp=strdup(hardware->auto_label);
@@ -776,14 +777,18 @@ void start_auto_mode(struct s_hardware *hardware)
/* Executing found commands */
for (int i=1;i<=nb_commands;i++) {
if (commands[i]) {
- more_printf("\n");
- more_printf("> Auto mode: Executing %d/%d : '%s'\n",i,nb_commands, commands[i]);
+ more_printf("\n");
+ if (debug)
+ more_printf("> Auto mode: Executing %d/%d : '%s'\n", i, nb_commands, commands[i]);
exec_command(commands[i], hardware);
free(commands[i]);
}
}
- more_printf("Exiting Auto mode\n");
+ if (debug)
+ more_printf("\nExiting Auto mode\n");
+
+ more_printf("\n");
}