diff options
| author | Meco Man <[email protected]> | 2022-11-18 14:37:05 -0500 |
|---|---|---|
| committer | Man, Jianting (Meco) <[email protected]> | 2022-11-21 21:39:45 -0500 |
| commit | 84eab69604df689716b54e1e6c38877f05d03b9f (patch) | |
| tree | f9fc9d6fa262c20f0629f3bf3ab3d0436f662003 /components | |
| parent | 10451fb95b55db57413e62aa34f9bcca7042dd9f (diff) | |
[msh] remove list_xxx commands, use 'list' to replace
Diffstat (limited to 'components')
| -rw-r--r-- | components/dfs/src/dfs.c | 6 | ||||
| -rw-r--r-- | components/finsh/cmd.c | 35 |
2 files changed, 19 insertions, 22 deletions
diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 284a662812..f1d7571c0c 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -520,7 +520,6 @@ struct dfs_fdtable *dfs_fdtable_get(void) } #ifdef RT_USING_FINSH -#include <finsh.h> int list_fd(void) { int index; @@ -566,7 +565,6 @@ int list_fd(void) return 0; } -MSH_CMD_EXPORT(list_fd, list file descriptor); -#endif -/*@}*/ +#endif /* RT_USING_FINSH */ +/*@}*/ diff --git a/components/finsh/cmd.c b/components/finsh/cmd.c index 137ca3acff..99d601b76d 100644 --- a/components/finsh/cmd.c +++ b/components/finsh/cmd.c @@ -247,7 +247,6 @@ long list_thread(void) return 0; } -MSH_CMD_EXPORT(list_thread, list thread); static void show_wait_queue(struct rt_list_node *list) { @@ -328,8 +327,7 @@ long list_sem(void) return 0; } -MSH_CMD_EXPORT(list_sem, list semaphore in system); -#endif +#endif /* RT_USING_SEMAPHORE */ #ifdef RT_USING_EVENT long list_event(void) @@ -393,8 +391,7 @@ long list_event(void) return 0; } -MSH_CMD_EXPORT(list_event, list event in system); -#endif +#endif /* RT_USING_EVENT */ #ifdef RT_USING_MUTEX long list_mutex(void) @@ -452,8 +449,7 @@ long list_mutex(void) return 0; } -MSH_CMD_EXPORT(list_mutex, list mutex in system); -#endif +#endif /* RT_USING_MUTEX */ #ifdef RT_USING_MAILBOX long list_mailbox(void) @@ -523,8 +519,7 @@ long list_mailbox(void) return 0; } -MSH_CMD_EXPORT(list_mailbox, list mail box in system); -#endif +#endif /* RT_USING_MAILBOX */ #ifdef RT_USING_MESSAGEQUEUE long list_msgqueue(void) @@ -590,8 +585,7 @@ long list_msgqueue(void) return 0; } -MSH_CMD_EXPORT(list_msgqueue, list message queue in system); -#endif +#endif /* RT_USING_MESSAGEQUEUE */ #ifdef RT_USING_MEMHEAP long list_memheap(void) @@ -647,8 +641,7 @@ long list_memheap(void) return 0; } -MSH_CMD_EXPORT(list_memheap, list memory heap in system); -#endif +#endif /* RT_USING_MEMHEAP */ #ifdef RT_USING_MEMPOOL long list_mempool(void) @@ -727,8 +720,7 @@ long list_mempool(void) return 0; } -MSH_CMD_EXPORT(list_mempool, list memory pool in system); -#endif +#endif /* RT_USING_MEMPOOL */ long list_timer(void) { @@ -791,7 +783,6 @@ long list_timer(void) return 0; } -MSH_CMD_EXPORT(list_timer, list timer in system); #ifdef RT_USING_DEVICE static char *const device_type_str[RT_Device_Class_Unknown] = @@ -886,8 +877,7 @@ long list_device(void) return 0; } -MSH_CMD_EXPORT(list_device, list device in system); -#endif +#endif /* RT_USING_DEVICE */ int cmd_list(int argc, char **argv) { @@ -931,6 +921,12 @@ int cmd_list(int argc, char **argv) list_msgqueue(); } #endif /* RT_USING_MESSAGEQUEUE */ +#ifdef RT_USING_MEMHEAP + else if(strcmp(argv[1], "memheap") == 0) + { + list_memheap(); + } +#endif /* RT_USING_MEMHEAP */ #ifdef RT_USING_MEMPOOL else if(strcmp(argv[1], "mempool") == 0) { @@ -978,6 +974,9 @@ _usage: #ifdef RT_USING_MESSAGEQUEUE rt_kprintf(" msgqueue - list message queues\n"); #endif /* RT_USING_MESSAGEQUEUE */ +#ifdef RT_USING_MEMHEAP + rt_kprintf(" memheap - list memory heaps\n"); +#endif /* RT_USING_MEMHEAP */ #ifdef RT_USING_MEMPOOL rt_kprintf(" mempool - list memory pools\n"); #endif /* RT_USING_MEMPOOL */ |
