mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
apps/nshlib: Add the pidof command and API nsh_getpid
Add the API "nsh_getpid" in "nsh_fsutils. c" and the nsh command pidof. Temporarily support two parameters, - s, and process name Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
This commit is contained in:
@@ -435,6 +435,10 @@ static const struct cmdmap_s g_cmdmap[] =
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_NSH_DISABLE_PIDOF)
|
||||
CMD_MAP("pidof", cmd_pidof, 2, 2, "<name>"),
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PM) && !defined(CONFIG_NSH_DISABLE_PMCONFIG)
|
||||
CMD_MAP("pmconfig", cmd_pmconfig, 1, 4,
|
||||
"[stay|relax] [normal|idle|standby|sleep] [domain]"),
|
||||
|
Reference in New Issue
Block a user