shell: fix netif command for return values#2736
Conversation
sys/shell/commands/sc_netif.c
Outdated
There was a problem hiding this comment.
Unrelated, but this bugged me :D
9f184dd to
45554bf
Compare
195e08d to
418a75a
Compare
|
Rebased to current master |
9358bf4 to
96a6855
Compare
|
Rebased tu current master |
sys/shell/commands/sc_netif.c
Outdated
There was a problem hiding this comment.
sure you want to remove the help text for set state?
|
I'll pass the hot potato along to get this finally merged. |
There was a problem hiding this comment.
I was just wondering, is there a reason you're not returning EINVAL here (an other errnos in the rest of the document)?
There was a problem hiding this comment.
Because we never established to (nor did I ever heard of) return of errnos in exit status of shell commands.
There was a problem hiding this comment.
But the other shell commands don't. Also, since the value of the errnos is highly dependent on the platform and the user will only see the value and not the macro (when calling echo "$?" in later shell implementations e.g.) I don't really see the point.
There was a problem hiding this comment.
I thought at least some values are specified by POSIX (but maybe it's just the name). Also, the shell doesn't necessarily use a plaintext protocol for I/O. However, I don't want to advocate for the use of errno values. Just wanted to point out that it has been used in RIOT context - though not in RIOT itself - for this purpose.
There was a problem hiding this comment.
Thanks for the clarification :)
b216b0f to
713c211
Compare
|
Rebased to current master. |
713c211 to
a099095
Compare
|
Rebased to current master and squashed |
|
kicked travis |
|
Travis likes it. |
|
Wow, that was fast. Then let's ACK and Go :) |
shell: fix netif command for return values
If we have return values, we should utilize them :-)