diff mbox series

[U-Boot] How to make commands non repeatable?

Message ID DM5PR1201MB248850E04F92D568AA1AC095966B0@DM5PR1201MB2488.namprd12.prod.outlook.com
State RFC
Delegated to: Tom Rini
Headers show
Series [U-Boot] How to make commands non repeatable? | expand

Commit Message

Radovan Prodanovic Oct. 23, 2019, 2:24 p.m. UTC
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 mbox series

Patch

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) {