* [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read
@ 2012-01-17 8:24 Heiko Schocher
2012-01-17 12:47 ` Jason Hobbs
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Heiko Schocher @ 2012-01-17 8:24 UTC (permalink / raw)
To: u-boot
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Jason Hobbs <jason.hobbs@calxeda.com>
---
| 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
--git a/common/menu.c b/common/menu.c
index 754a9f9..aa16c9a 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -236,8 +236,10 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
if (readret >= 0) {
choice_item = menu_item_by_key(m, cbuf);
- if (!choice_item)
+ if (!choice_item) {
printf("%s not found\n", cbuf);
+ m->timeout = 0;
+ }
} else {
puts("^C\n");
return -EINTR;
--
1.7.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read
2012-01-17 8:24 [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read Heiko Schocher
@ 2012-01-17 12:47 ` Jason Hobbs
2012-01-17 19:16 ` Mike Frysinger
2012-01-18 6:18 ` [U-Boot] [PATCH v2] common, menu: do not timeout again if an item was selected but not found Heiko Schocher
2 siblings, 0 replies; 5+ messages in thread
From: Jason Hobbs @ 2012-01-17 12:47 UTC (permalink / raw)
To: u-boot
Dear Heiko,
On Tue, Jan 17, 2012 at 03:24:29AM -0500, Heiko Schocher wrote:
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Cc: Jason Hobbs <jason.hobbs@calxeda.com>
Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
> ---
> common/menu.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/common/menu.c b/common/menu.c
> index 754a9f9..aa16c9a 100644
> --- a/common/menu.c
> +++ b/common/menu.c
> @@ -236,8 +236,10 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
> if (readret >= 0) {
> choice_item = menu_item_by_key(m, cbuf);
>
> - if (!choice_item)
> + if (!choice_item) {
> printf("%s not found\n", cbuf);
> + m->timeout = 0;
> + }
> } else {
> puts("^C\n");
> return -EINTR;
> --
> 1.7.7.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read
2012-01-17 8:24 [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read Heiko Schocher
2012-01-17 12:47 ` Jason Hobbs
@ 2012-01-17 19:16 ` Mike Frysinger
2012-01-18 6:13 ` Heiko Schocher
2012-01-18 6:18 ` [U-Boot] [PATCH v2] common, menu: do not timeout again if an item was selected but not found Heiko Schocher
2 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2012-01-17 19:16 UTC (permalink / raw)
To: u-boot
On Tuesday 17 January 2012 03:24:29 Heiko Schocher wrote:
> --- a/common/menu.c
> +++ b/common/menu.c
> choice_item = menu_item_by_key(m, cbuf);
>
> - if (!choice_item)
> + if (!choice_item) {
> printf("%s not found\n", cbuf);
> + m->timeout = 0;
> + }
> } else {
> puts("^C\n");
> return -EINTR;
the summary says "do not timeout again if a line is read", but this C code
seems like "do not timeout again if an item was selected but not found". but
maybe i'm reading the menu code incorrectly ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120117/425e91f8/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read
2012-01-17 19:16 ` Mike Frysinger
@ 2012-01-18 6:13 ` Heiko Schocher
0 siblings, 0 replies; 5+ messages in thread
From: Heiko Schocher @ 2012-01-18 6:13 UTC (permalink / raw)
To: u-boot
Hello Mike,
Mike Frysinger wrote:
> On Tuesday 17 January 2012 03:24:29 Heiko Schocher wrote:
>> --- a/common/menu.c
>> +++ b/common/menu.c
>> choice_item = menu_item_by_key(m, cbuf);
>>
>> - if (!choice_item)
>> + if (!choice_item) {
>> printf("%s not found\n", cbuf);
>> + m->timeout = 0;
>> + }
>> } else {
>> puts("^C\n");
>> return -EINTR;
>
> the summary says "do not timeout again if a line is read", but this C code
> seems like "do not timeout again if an item was selected but not found". but
> maybe i'm reading the menu code incorrectly ?
No, you are reading C code right, fix this, thanks!
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH v2] common, menu: do not timeout again if an item was selected but not found
2012-01-17 8:24 [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read Heiko Schocher
2012-01-17 12:47 ` Jason Hobbs
2012-01-17 19:16 ` Mike Frysinger
@ 2012-01-18 6:18 ` Heiko Schocher
2 siblings, 0 replies; 5+ messages in thread
From: Heiko Schocher @ 2012-01-18 6:18 UTC (permalink / raw)
To: u-boot
Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Jason Hobbs <jason.hobbs@calxeda.com>
Cc: Mike Frysinger <vapier@gentoo.org>
---
- changes for v2:
- add Acked-by from Jason Hobbs <jason.hobbs@calxeda.com>
- add comment from Mike Frysinger:
- respell summary text
---
| 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
--git a/common/menu.c b/common/menu.c
index 754a9f9..aa16c9a 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -236,8 +236,10 @@ static inline int menu_interactive_choice(struct menu *m, void **choice)
if (readret >= 0) {
choice_item = menu_item_by_key(m, cbuf);
- if (!choice_item)
+ if (!choice_item) {
printf("%s not found\n", cbuf);
+ m->timeout = 0;
+ }
} else {
puts("^C\n");
return -EINTR;
--
1.7.7.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-18 6:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 8:24 [U-Boot] [PATCH] common, menu: do not trigger timeout again, if a line is read Heiko Schocher
2012-01-17 12:47 ` Jason Hobbs
2012-01-17 19:16 ` Mike Frysinger
2012-01-18 6:13 ` Heiko Schocher
2012-01-18 6:18 ` [U-Boot] [PATCH v2] common, menu: do not timeout again if an item was selected but not found Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox