From 28b8e43181f97a480c1fdc4e2b57a319d29ddcfd Mon Sep 17 00:00:00 2001 From: heyuanjie <943313837@qq.com> Date: Mon, 11 Jun 2018 14:26:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4lwp=20msh=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/lwp/lwp.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index 6837e30b53..13e2a8f2ef 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -352,13 +352,3 @@ int exec(char *filename) return -RT_ERROR; } -FINSH_FUNCTION_EXPORT(exec, loader a user app &run); - -int _exec(int argc, char **argv) -{ - if (argc != 2) - return -RT_ERROR; - - return exec(argv[1]); -} -MSH_CMD_EXPORT_ALIAS(_exec, exec, loader a user app &run); From e1be777adc7dc3076bb49edfd527d3f501f3d874 Mon Sep 17 00:00:00 2001 From: heyuanjie <943313837@qq.com> Date: Mon, 11 Jun 2018 14:28:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E9=99=A4=E8=AD=A6=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/lwp/lwp_mem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/lwp/lwp_mem.c b/components/lwp/lwp_mem.c index 95c95441b8..ca390e4f96 100644 --- a/components/lwp/lwp_mem.c +++ b/components/lwp/lwp_mem.c @@ -22,7 +22,6 @@ * 2018-03-24 Tanek the first version */ -#include #include #include @@ -77,7 +76,7 @@ static void *rt_lwp_malloc_page(struct rt_lwp *lwp, rt_size_t npages) dbg_log(DBG_LOG, "lwp alloc page: %d\n", npages); - sprintf(name, "lwp%02x", lwp->heap_cnt); + rt_sprintf(name, "lwp%02x", lwp->heap_cnt); rt_lwp_memheap_init(lwp_heap, name, chunk, npages * LWP_MEM_PAGE_SIZE); rt_list_insert_before(&lwp->hlist, &lwp_heap->mlist);