Code Review
/
nsh_sfc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
37a5ce7
)
Fix nsh_action CLI issue
28/3928/2
author
Hongjun Ni
<
[email protected]
>
Wed, 23 Nov 2016 14:20:06 +0000
(22:20 +0800)
committer
Hongjun Ni
<
[email protected]
>
Wed, 23 Nov 2016 08:21:57 +0000
(08:21 +0000)
rebuild
Change-Id: I5d823724186bdc31b15e4739f9f33f0a29d87fbe
Signed-off-by: Hongjun Ni <
[email protected]
>
nsh-plugin/nsh/nsh.c
patch
|
blob
|
history
diff --git
a/nsh-plugin/nsh/nsh.c
b/nsh-plugin/nsh/nsh.c
index
ae440b8
..
924eda2
100644
(file)
--- a/
nsh-plugin/nsh/nsh.c
+++ b/
nsh-plugin/nsh/nsh.c
@@
-311,14
+311,15
@@
static uword unformat_nsh_action (unformat_input_t * input, va_list * args)
if (unformat (input, "swap"))
*result = NSH_ACTION_SWAP;
- if (unformat (input, "push"))
+
else
if (unformat (input, "push"))
*result = NSH_ACTION_PUSH;
- if (unformat (input, "pop"))
+
else
if (unformat (input, "pop"))
*result = NSH_ACTION_POP;
else if (unformat (input, "%d", &tmp))
*result = tmp;
else
return 0;
+
return 1;
}