aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2012-05-29 22:32:14 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2012-05-29 22:34:51 +0200
commitdca99112185bdb2065821e924a70e83a4fb4100b (patch)
treef2985db73d9fba3859df589cafbd7052ef6b5161
parent74cd0fa3b1a45d9222984842a75112e593f902d2 (diff)
downloadsyslinux-dca99112185bdb2065821e924a70e83a4fb4100b.tar.gz
syslinux-dca99112185bdb2065821e924a70e83a4fb4100b.tar.xz
syslinux-dca99112185bdb2065821e924a70e83a4fb4100b.zip
hdt: Removing builting sleep support in say
If people want to sleep while saying message, they now have to use the sleep command instead of the previous specific %x syntax.
-rw-r--r--com32/hdt/floppy/hdt.cfg2
-rw-r--r--com32/hdt/hdt-cli-hdt.c18
2 files changed, 1 insertions, 19 deletions
diff --git a/com32/hdt/floppy/hdt.cfg b/com32/hdt/floppy/hdt.cfg
index a5afd608..7cfe6a7d 100644
--- a/com32/hdt/floppy/hdt.cfg
+++ b/com32/hdt/floppy/hdt.cfg
@@ -93,7 +93,7 @@ TEXT HELP
VESA mode is enabled
ENDTEXT
COM32 hdt.c32
-APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids quiet vesa nomenu auto='show memory;say `########`;say `Starting memtest in 5 sec`%5;exit' postexec='memtest'
+APPEND modules_pcimap=modules.pcimap modules_alias=modules.alias pciids=pci.ids quiet vesa nomenu auto='show memory;say `########`;say `Starting memtest in 5 sec`;sleep 5;exit' postexec='memtest'
LABEL display
MENU LABEL Display feature (VESA mode)
diff --git a/com32/hdt/hdt-cli-hdt.c b/com32/hdt/hdt-cli-hdt.c
index 70cd0499..3af6770b 100644
--- a/com32/hdt/hdt-cli-hdt.c
+++ b/com32/hdt/hdt-cli-hdt.c
@@ -294,7 +294,6 @@ static void do_say(int argc , char **argv ,
char text_to_say[255]={0};
int arg=0;
- int sleep_time=0;
#if DEBUG
for (int i=0; i<argc;i++) dprintf("SAY: arg[%d]={%s}\n",i,argv[i]);
#endif
@@ -317,24 +316,7 @@ static void do_say(int argc , char **argv ,
dprintf("SAY CMD = [%s]\n",text_to_say);
}
- /* The % char can be in the same argument, let's consider it again */
- arg--;
-
- /* Searching for a % argument to determine the time to show the message */
- char *time_to_display = NULL;
- /* Search for a requested time to display */
- while ( ((time_to_display=strchr(argument, '%')) == NULL) && (arg+1<argc)) {
- arg++;
- argument = (char *)argv[arg];
- }
-
- if (time_to_display != NULL) {
- sleep_time=atoi(time_to_display+1);
- dprintf("SAY CMD :Time to display = %d\n",sleep_time);
- }
-
printf("%s\n",text_to_say);
- sleep(sleep_time);
}
}