[syslinux:master] hdt: Removing builting sleep support in say

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Oct 22 12:51:05 PDT 2012


Commit-ID:  dca99112185bdb2065821e924a70e83a4fb4100b
Gitweb:     http://www.syslinux.org/commit/dca99112185bdb2065821e924a70e83a4fb4100b
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Tue, 29 May 2012 22:32:14 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Tue, 29 May 2012 22:34:51 +0200

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.

---
 com32/hdt/floppy/hdt.cfg |    2 +-
 com32/hdt/hdt-cli-hdt.c  |   18 ------------------
 2 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/com32/hdt/floppy/hdt.cfg b/com32/hdt/floppy/hdt.cfg
index a5afd60..7cfe6a7 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 70cd049..3af6770 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);
   }
 }
 


More information about the Syslinux-commits mailing list