nshlib: Add fdinfo to get information about the process associated fd

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1
2023-06-14 16:14:59 +08:00
committed by Xiang Xiao
parent ed370ec674
commit 415168dde6
4 changed files with 109 additions and 0 deletions

View File

@@ -234,6 +234,12 @@ static const struct cmdmap_s g_cmdmap[] =
CMD_MAP("false", cmd_false, 1, 1, NULL),
#endif
#ifdef CONFIG_FS_PROCFS
# ifndef CONFIG_NSH_DISABLE_FDINFO
CMD_MAP("fdinfo", cmd_fdinfo, 1, 2, "[pid]"),
# endif
#endif
#ifndef CONFIG_NSH_DISABLE_FREE
CMD_MAP("free", cmd_free, 1, 1, NULL),
#endif