[finsh] Add more option for ps command
This commit is contained in:
parent
9e3c42273d
commit
6a7638599c
|
@ -243,6 +243,11 @@ int cmd_mkfs(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (result != RT_EOK)
|
||||
{
|
||||
rt_kprintf("mkfs failed, result=%d\n", result);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
FINSH_FUNCTION_EXPORT_ALIAS(cmd_mkfs, __cmd_mkfs, format disk with file system);
|
||||
|
@ -292,7 +297,13 @@ FINSH_FUNCTION_EXPORT_ALIAS(cmd_netstat, __cmd_netstat, list the information of
|
|||
int cmd_ps(int argc, char** argv)
|
||||
{
|
||||
extern long list_thread(void);
|
||||
extern int list_module(void);
|
||||
|
||||
#ifdef RT_USING_MODULE
|
||||
if ((argc == 2) && (strcmp(argv[1], "-m") == 0))
|
||||
list_module();
|
||||
else
|
||||
#endif
|
||||
list_thread();
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue