You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/09/27 15:24:27 UTC

(nuttx-apps) branch master updated: nshlib: Add missing newline in cmd_pidof output

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new dca6c0cd9 nshlib: Add missing newline in cmd_pidof output
dca6c0cd9 is described below

commit dca6c0cd9148724997a81ad6ae4e26b7153112be
Author: Huang Qi <hu...@xiaomi.com>
AuthorDate: Fri Sep 27 14:43:27 2024 +0800

    nshlib: Add missing newline in cmd_pidof output
    
    Add newline at the end of cmd_pidof to show nsh
    prompt correctly.
    
    Before this patch:
    ```
    nsh> pidof wifi
    3 nsh>
    ```
    
    After:
    ```
    nsh> pidof wifi
    3
    nsh>
    ```
    Signed-off-by: Huang Qi <hu...@xiaomi.com>
---
 nshlib/nsh_proccmds.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/nshlib/nsh_proccmds.c b/nshlib/nsh_proccmds.c
index 8b3d88e7f..859d0b808 100644
--- a/nshlib/nsh_proccmds.c
+++ b/nshlib/nsh_proccmds.c
@@ -694,6 +694,8 @@ int cmd_pidof(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
       nsh_output(vtbl, "%d ", pids[i]);
     }
 
+  nsh_output(vtbl, "\n");
+
   return OK;
 }
 #endif