This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit edf9165494722a99862eaaaa9e5ebbe55e6f626c Author: Marco Casaroli <[email protected]> AuthorDate: Sun Oct 18 16:34:12 2026 +0200 nshlib: Fix the nxstyle errors in nsh_builtin.c and nsh_fileapps.c. Fix the indentation of one line in each file, and add the blank lines after declarations that nxstyle wants. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- nshlib/nsh_builtin.c | 4 +++- nshlib/nsh_fileapps.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/nshlib/nsh_builtin.c b/nshlib/nsh_builtin.c index 76f542f8f..52085b571 100644 --- a/nshlib/nsh_builtin.c +++ b/nshlib/nsh_builtin.c @@ -130,7 +130,7 @@ int nsh_builtin(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, * foreground */ - vtbl->np.np_lastpid = ret; + vtbl->np.np_lastpid = ret; #ifdef CONFIG_SCHED_WAITPID /* CONFIG_SCHED_WAITPID is selected, so we may run the command in @@ -184,6 +184,7 @@ int nsh_builtin(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, */ int errcode = errno; + if (errcode == ECHILD) { ret = OK; @@ -254,6 +255,7 @@ int nsh_builtin(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, */ struct sched_param sched; + sched_getparam(ret, &sched); nsh_output(vtbl, "%s [%d:%d]\n", cmd, ret, sched.sched_priority); diff --git a/nshlib/nsh_fileapps.c b/nshlib/nsh_fileapps.c index 1d6cfe69d..796b167cd 100644 --- a/nshlib/nsh_fileapps.c +++ b/nshlib/nsh_fileapps.c @@ -279,7 +279,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, * foreground */ - vtbl->np.np_lastpid = pid; + vtbl->np.np_lastpid = pid; #ifdef CONFIG_SCHED_WAITPID /* CONFIG_SCHED_WAITPID is selected, so we may run the command in * foreground unless we were specifically requested to run the command @@ -325,6 +325,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, */ int errcode = errno; + if (errcode == ECHILD) { ret = OK; @@ -376,6 +377,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, #if !defined(CONFIG_SCHED_WAITPID) || !defined(CONFIG_NSH_DISABLEBG) { struct sched_param sched; + sched_getparam(ret, &sched); nsh_output(vtbl, "%s [%d:%d]\n", cmd, ret, sched.sched_priority);
