projects
/
karo-tx-uboot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b86a63c
)
common/cmd_misc.c: fix return code of sleep command
author
Lothar Waßmann
<LW@KARO-electronics.de>
Wed, 29 Jun 2016 08:46:49 +0000
(10:46 +0200)
committer
Lothar Waßmann
<LW@KARO-electronics.de>
Wed, 29 Jun 2016 09:12:36 +0000
(11:12 +0200)
-1 is equivalent to CMD_RET_USAGE and makes the sleep command print
its usage information when aborted by <CTRL-C> which is most probably
not intended.
common/cmd_misc.c
patch
|
blob
|
history
diff --git
a/common/cmd_misc.c
b/common/cmd_misc.c
index
93f9eab
..
41bb860
100644
(file)
--- a/
common/cmd_misc.c
+++ b/
common/cmd_misc.c
@@
-23,12
+23,12
@@
static int do_sleep(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
while (get_timer(start) < delay) {
if (ctrlc())
while (get_timer(start) < delay) {
if (ctrlc())
- return
(-1)
;
+ return
CMD_RET_FAILURE
;
udelay(100);
}
udelay(100);
}
- return
0
;
+ return
CMD_RET_SUCCESS
;
}
U_BOOT_CMD(
}
U_BOOT_CMD(