From 667c03db97f2e85ca99b05236848290cf7d0c864 Mon Sep 17 00:00:00 2001 From: ardafu Date: Fri, 31 Jul 2015 11:07:54 +0800 Subject: [PATCH] [FINSH] Add macro MSH_CMD_EXPORT_ALIAS --- components/finsh/finsh.h | 3 +++ include/rtdef.h | 1 + 2 files changed, 4 insertions(+) diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index 0b270ddeaf..d134422aa9 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -347,8 +347,11 @@ struct finsh_sysvar* finsh_sysvar_lookup(const char* name); #ifdef FINSH_USING_MSH #define MSH_CMD_EXPORT(command, desc) \ FINSH_FUNCTION_EXPORT_CMD(command, __cmd_##command, desc) +#define MSH_CMD_EXPORT_ALIAS(command, alias, desc) \ + FINSH_FUNCTION_EXPORT_ALIAS(command, __cmd_##alias, desc) #else #define MSH_CMD_EXPORT(command, desc) +#define MSH_CMD_EXPORT_ALIAS(command, alias, desc) #endif struct finsh_token diff --git a/include/rtdef.h b/include/rtdef.h index 4c3581b91a..7127b68802 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -217,6 +217,7 @@ typedef int (*init_fn_t)(void); #define FINSH_VAR_EXPORT(name, type, desc) #define MSH_CMD_EXPORT(command, desc) +#define MSH_CMD_EXPORT_ALIAS(command, alias, desc) #elif !defined(FINSH_USING_SYMTAB) #define FINSH_FUNCTION_EXPORT_CMD(name, cmd, desc) #endif