How to make commands non repeatable?

So instead of this:

=> print ipaddr
ipaddr=10.38.72.69
=>
ipaddr=10.38.72.69
=>
ipaddr=10.38.72.69
=>

To get:

=>
=> print ipaddr
ipaddr=10.38.72.69
=>
=>
=>
=>

Is there a better way of accomplishing this compared to the mod below:

-bash-4.2$ git diff
diff --git a/common/cli_hush.c b/common/cli_hush.c
index 296542f..2afa2de 100644
--- a/common/cli_hush.c
+++ b/common/cli_hush.c
@@ -1024,7 +1024,7 @@ static void get_user_input(struct in_str *i)
        n = strlen(console_buffer);
        console_buffer[n] = '\n';
        console_buffer[n+1]= '\0';
-       if (had_ctrlc()) flag_repeat = 0;
+       flag_repeat = 0;
        clear_ctrlc();
        do_repeat = 0;
        if (i->promptmode == 1) {

________________________________
NOTE: This e-mail (including any attachments) is for the sole use of the 
intended recipient(s) and may contain information that is confidential and/or 
protected by legal privilege. Any unauthorized review, use, copy, disclosure or 
distribution of this e-mail is strictly prohibited. If you are not the intended 
recipient, please notify Mitel immediately and destroy all copies of this 
e-mail. Mitel does not accept any liability for breach of security, error or 
virus that may result from the transmission of this message.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to