shell: Fix return error in shell_execute_cmd
ENOEXEC should be used for executable file format error. While is undertandable return it when the command is wrong, this function is returning it two cases where other errors are more descriptive. When parameter is NULL, is better return EINVAL. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
74a74bb6b8
commit
bc4cb76df5
1 changed files with 1 additions and 1 deletions
|
@ -1437,7 +1437,7 @@ int shell_execute_cmd(const struct shell *shell, const char *cmd)
|
|||
}
|
||||
|
||||
if (cmd_len > (CONFIG_SHELL_CMD_BUFF_SIZE - 1)) {
|
||||
return -ENOEXEC;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (shell == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue