summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcopilot-swe-agent[bot] <[email protected]>2025-11-16 14:05:44 +0000
committercopilot-swe-agent[bot] <[email protected]>2025-11-16 14:05:44 +0000
commit9b599821124126983382c1977babcb93641a566d (patch)
tree21f90039fad0c1ec55572459cf477a6adc7445ac
parentda867222e98e49a3c1e4f2bd60256a289f10c1ee (diff)
Remove all FINSH_FUNCTION_EXPORT_ALIAS calls and definitionscopilot/clean-up-finsh-function-code
Co-authored-by: BernardXiong <[email protected]>
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c2
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c2
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c4
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c2
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c2
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c2
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c6
-rw-r--r--bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c2
-rw-r--r--bsp/apm32/libraries/Drivers/drv_common.c2
-rw-r--r--bsp/at91/at91sam9260/platform/reset.c1
-rw-r--r--bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c5
-rwxr-xr-xbsp/simulator/drivers/board.c1
-rw-r--r--bsp/simulator/drivers/module_win32.c5
-rw-r--r--components/dfs/dfs_v1/src/dfs_posix.c4
-rw-r--r--components/dfs/dfs_v2/src/dfs_posix.c4
-rw-r--r--components/drivers/mtd/mtd_nand.c9
-rw-r--r--components/drivers/pm/pm.c1
-rw-r--r--components/finsh/finsh.h11
-rw-r--r--include/rtdef.h1
19 files changed, 2 insertions, 64 deletions
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c b/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c
index 98defd1f78..a7a5b0918c 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/source/disp2/disp/disp_debug.c
@@ -183,5 +183,3 @@ static int cmd_disp_debug(int argc, const char **argv)
}
return 0;
}
-
-FINSH_FUNCTION_EXPORT_ALIAS(cmd_disp_debug, __cmd_disp, disp cmd);
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c
index 8665d8dd23..5603c3cf83 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_alpha_test.c
@@ -130,5 +130,3 @@ int disp_layer_alpha_test(int argc, char **argv)
disp_mem_clear(1);
return 0;
}
-
-FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_alpha_test, __cmd_disp_layer_alpha_test, disp_layer_alpha_test);
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c
index a4c4b108c5..2f2eba9fd1 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_cfg.c
@@ -556,7 +556,3 @@ int parse_cmdline_and_set_config(int argc, char **argv)
}
}
-
-
-FINSH_FUNCTION_EXPORT_ALIAS(parse_cmdline_and_set_config, disp_layer_cfg, disp set layer);
-
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c
index 2aae97a868..18a7585daa 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_format_test.c
@@ -134,5 +134,3 @@ int disp_layer_format_test(int argc, char **argv)
return 0;
}
-
-FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_format_test, __cmd_disp_layer_format_test, disp_layer_format_test);
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c
index 607dfc7c22..f7a990646d 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_rgb_test.c
@@ -78,5 +78,3 @@ int disp_layer_rgb_test(int argc, char **argv)
return 0;
}
-
-FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_rgb_test, __cmd_disp_layer_rgb_test, disp_layer_rgb_test);
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c
index 0c868bc485..0e061fce9c 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_layer_scal_test.c
@@ -145,5 +145,3 @@ int disp_layer_scal_test(int argc, char **argv)
return 0;
}
-
-FINSH_FUNCTION_EXPORT_ALIAS(disp_layer_scal_test, __cmd_disp_layer_scal_test, disp_layer_scal_test);
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c
index 169eebc962..b3b1cf5687 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_lbc_test.c
@@ -157,9 +157,3 @@ int lbc_test(int argc, char **argv)
return 0;
}
-
-
-
-
-FINSH_FUNCTION_EXPORT_ALIAS(lbc_test, __cmd_disp_lbc_test, disp lbc test);
-
diff --git a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c
index 0b483b289b..c820143b81 100644
--- a/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c
+++ b/bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c
@@ -264,5 +264,3 @@ int parse_cmdline_and_alloc(int argc, char **argv)
}
}
-FINSH_FUNCTION_EXPORT_ALIAS(parse_cmdline_and_alloc, disp_mem, disp mem);
-
diff --git a/bsp/apm32/libraries/Drivers/drv_common.c b/bsp/apm32/libraries/Drivers/drv_common.c
index 9a357712cb..9baf4bc6ec 100644
--- a/bsp/apm32/libraries/Drivers/drv_common.c
+++ b/bsp/apm32/libraries/Drivers/drv_common.c
@@ -6,7 +6,7 @@
* Change Logs:
* Date Author Notes
* 2020-08-20 Abbcc first version
- * 2022-03-04 stevetong459 FINSH_FUNCTION_EXPORT_ALIAS change to MSH_CMD_EXPORT for reboot function.
+ * 2022-03-04 stevetong459 Use MSH_CMD_EXPORT for reboot function.
*/
#include "drv_common.h"
diff --git a/bsp/at91/at91sam9260/platform/reset.c b/bsp/at91/at91sam9260/platform/reset.c
index 6679ab57fe..df91d69b98 100644
--- a/bsp/at91/at91sam9260/platform/reset.c
+++ b/bsp/at91/at91sam9260/platform/reset.c
@@ -30,7 +30,6 @@ void machine_shutdown(void)
#ifdef RT_USING_FINSH
#include <finsh.h>
-FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reset, restart the system);
#ifdef FINSH_USING_MSH
int cmd_reset(int argc, char** argv)
diff --git a/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c b/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c
index 1cf3fcf95e..4a09ee5b60 100644
--- a/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c
+++ b/bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c
@@ -620,7 +620,6 @@ void nand_read(int block, int page)
rt_kprintf("oob data:\n");
dump_mem(nand_oob, 16);
}
-FINSH_FUNCTION_EXPORT_ALIAS(nand_read, read_page, read page[block/page]);
void nand_write(int block, int page)
{
@@ -630,13 +629,11 @@ void nand_write(int block, int page)
NF_WritePage(block, page, nand_buffer);
}
-FINSH_FUNCTION_EXPORT_ALIAS(nand_write, write_page, write page[block/page]);
void nand_erase(int block)
{
NF_EraseBlock(block);
}
-FINSH_FUNCTION_EXPORT_ALIAS(nand_erase, erase_block, erase block[block]);
void nand_readoob(int block, int page)
{
@@ -646,7 +643,6 @@ void nand_readoob(int block, int page)
rt_kprintf("oob data:\n");
dump_mem(nand_oob, 16);
}
-FINSH_FUNCTION_EXPORT_ALIAS(nand_readoob, readoob, read oob[block/page]);
void nand_erase_chip(void)
{
@@ -661,5 +657,4 @@ void nand_erase_chip(void)
NF_EraseBlock(i);
}
}
-FINSH_FUNCTION_EXPORT_ALIAS(nand_erase_chip, erase_chip, erase whole chip);
#endif
diff --git a/bsp/simulator/drivers/board.c b/bsp/simulator/drivers/board.c
index 5d66ae231c..b47e8dc2d7 100755
--- a/bsp/simulator/drivers/board.c
+++ b/bsp/simulator/drivers/board.c
@@ -84,7 +84,6 @@ void rt_hw_exit(void)
#if defined(RT_USING_FINSH)
#include <finsh.h>
-FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_exit, exit, exit rt - thread);
MSH_CMD_EXPORT_ALIAS(rt_hw_exit, quit, exit rt-thread);
#endif /* RT_USING_FINSH */
diff --git a/bsp/simulator/drivers/module_win32.c b/bsp/simulator/drivers/module_win32.c
index 183497f5c6..0d4abd22ec 100644
--- a/bsp/simulator/drivers/module_win32.c
+++ b/bsp/simulator/drivers/module_win32.c
@@ -347,11 +347,6 @@ rt_module_t rt_module_open(const char *path)
/* FreeLibrary(hinstlib); */
}
-#if defined(RT_USING_FINSH)
-#include <finsh.h>
-FINSH_FUNCTION_EXPORT_ALIAS(rt_module_open, exec, exec module from a file);
-#endif
-
#endif
#define RT_MODULE_ARG_MAX 8
diff --git a/components/dfs/dfs_v1/src/dfs_posix.c b/components/dfs/dfs_v1/src/dfs_posix.c
index f3d7b70c31..7c2b034c09 100644
--- a/components/dfs/dfs_v1/src/dfs_posix.c
+++ b/components/dfs/dfs_v1/src/dfs_posix.c
@@ -977,10 +977,6 @@ int chdir(const char *path)
return 0;
}
RTM_EXPORT(chdir);
-
-#ifdef RT_USING_FINSH
-FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory);
-#endif
#endif
/**
diff --git a/components/dfs/dfs_v2/src/dfs_posix.c b/components/dfs/dfs_v2/src/dfs_posix.c
index d0eff53a46..12875dfcdc 100644
--- a/components/dfs/dfs_v2/src/dfs_posix.c
+++ b/components/dfs/dfs_v2/src/dfs_posix.c
@@ -1240,10 +1240,6 @@ int chdir(const char *path)
return 0;
}
RTM_EXPORT(chdir);
-
-#ifdef RT_USING_FINSH
-FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory);
-#endif
#endif
/**
diff --git a/components/drivers/mtd/mtd_nand.c b/components/drivers/mtd/mtd_nand.c
index 65402194c4..0f17075751 100644
--- a/components/drivers/mtd/mtd_nand.c
+++ b/components/drivers/mtd/mtd_nand.c
@@ -411,15 +411,6 @@ help:
MSH_CMD_EXPORT(mtd_nand, MTD nand device test function);
#endif /* RT_USING_FINSH */
-#ifndef RT_USING_FINSH_ONLY
-FINSH_FUNCTION_EXPORT_ALIAS(mtd_nandid, nand_id, read ID - nandid(name));
-FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_read, nand_read, read page in nand - nand_read(name, block, page));
-FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_readoob, nand_readoob, read spare data in nand - nand_readoob(name, block, page));
-FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_write, nand_write, write dump data to nand - nand_write(name, block, page));
-FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_erase, nand_erase, nand_erase(name, block));
-FINSH_FUNCTION_EXPORT_ALIAS(mtd_nand_erase_all, nand_erase_all, erase all of nand device - nand_erase_all(name, block));
-#endif /* RT_USING_FINSH_ONLY */
-
#endif /* defined(RT_MTD_NAND_DEBUG) && defined(RT_USING_FINSH) */
#endif /* RT_USING_MTD_NAND */
diff --git a/components/drivers/pm/pm.c b/components/drivers/pm/pm.c
index b4ad3b2bbd..e836c7462c 100644
--- a/components/drivers/pm/pm.c
+++ b/components/drivers/pm/pm.c
@@ -1279,7 +1279,6 @@ static void rt_pm_dump_status(void)
}
rt_kprintf("+--------+------+------------+-----------+\n");
}
-FINSH_FUNCTION_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);
MSH_CMD_EXPORT_ALIAS(rt_pm_dump_status, pm_dump, dump power management status);
#endif
diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h
index a40d1b3ed9..58d2dd9692 100644
--- a/components/finsh/finsh.h
+++ b/components/finsh/finsh.h
@@ -121,16 +121,7 @@ typedef long (*syscall_func)(void);
*/
#define FINSH_FUNCTION_EXPORT(name, desc)
-/**
- * @ingroup group_finsh
- *
- * @brief Exports a system function with an alias name to finsh shell.
- *
- * @param[in] name Name of function.
- * @param[in] alias Alias name of function.
- * @param[in] desc Description of function, which will show in help.
- */
-#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc)
+
/**
* @ingroup group_finsh
diff --git a/include/rtdef.h b/include/rtdef.h
index f3e10fe51f..d706499327 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -206,7 +206,6 @@ typedef int (*init_fn_t)(void);
#if !defined(RT_USING_FINSH)
/* define these to empty, even if not include finsh.h file */
#define FINSH_FUNCTION_EXPORT(name, desc)
-#define FINSH_FUNCTION_EXPORT_ALIAS(name, alias, desc)
#define MSH_CMD_EXPORT(command, desc)
#define MSH_CMD_EXPORT_ALIAS(command, alias, desc)