Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Copy link
Member

@Rbb666 Rbb666 Oct 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot FINSH_FUNCTION_EXPORT_ALIAS 调用,统一修改为 MSH_CMD_EXPORT 进行替换,请注意 MSH_CMD_EXPORT 的正确使用。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot FINSH_FUNCTION_EXPORT_ALIAS 调用,统一修改为 MSH_CMD_EXPORT 进行替换,请注意 MSH_CMD_EXPORT 的正确使用。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

明白了,我会将 FINSH_FUNCTION_EXPORT_ALIAS 正确替换为 MSH_CMD_EXPORT_ALIAS,保持相同的参数顺序。

Understood, I will properly replace FINSH_FUNCTION_EXPORT_ALIAS with MSH_CMD_EXPORT_ALIAS, maintaining the same parameter order.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已完成,所有 FINSH_FUNCTION_EXPORT_ALIAS 已正确替换为 MSH_CMD_EXPORT_ALIAS,保持相同的参数顺序,commit: f2c36dbb

Completed, all FINSH_FUNCTION_EXPORT_ALIAS properly replaced with MSH_CMD_EXPORT_ALIAS with same parameter order, commit: f2c36dbb

Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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);

2 changes: 0 additions & 2 deletions bsp/allwinner/libraries/sunxi-hal/hal/test/disp2/disp_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

3 changes: 0 additions & 3 deletions bsp/at91/at91sam9260/platform/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,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)
{
Expand Down
5 changes: 0 additions & 5 deletions bsp/fujitsu/mb9x/mb9bf506r/drivers/nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand All @@ -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
2 changes: 0 additions & 2 deletions bsp/simulator/drivers/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,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 */

Expand Down
5 changes: 1 addition & 4 deletions bsp/simulator/drivers/module_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,7 @@ 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

Expand Down
4 changes: 1 addition & 3 deletions components/dfs/dfs_v1/src/dfs_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,9 +978,7 @@ int chdir(const char *path)
}
RTM_EXPORT(chdir);

#ifdef RT_USING_FINSH
FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory);
#endif

#endif

/**
Expand Down
4 changes: 1 addition & 3 deletions components/dfs/dfs_v2/src/dfs_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,9 +1241,7 @@ int chdir(const char *path)
}
RTM_EXPORT(chdir);

#ifdef RT_USING_FINSH
FINSH_FUNCTION_EXPORT_ALIAS(chdir, cd, change current working directory);
#endif

#endif

/**
Expand Down
9 changes: 1 addition & 8 deletions components/drivers/mtd/mtd_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,7 @@ static void mtd_nand(int argc, char **argv)
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) */

Expand Down
1 change: 0 additions & 1 deletion components/drivers/pm/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 0 additions & 11 deletions components/finsh/finsh.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,6 @@ 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
*
Expand Down
13 changes: 1 addition & 12 deletions components/vbus/vbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,16 +1303,5 @@ void rt_vbus_chm_wm_dump(void)
}
#endif

#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_rb_dump, vbrb, dump vbus ringbuffer status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_chn_dump, vbchn, dump vbus channel status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_sess_dump, vbses, dump vbus session status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_que_dump, vbque, dump vbus out queue status);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_total_data_sz, vbtsz, total in data);
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_data_pkt_dump, vbdq, dump the data queue);
#ifdef RT_VBUS_USING_FLOW_CONTROL
FINSH_FUNCTION_EXPORT_ALIAS(rt_vbus_chm_wm_dump, vbwm, dump vbus water mark status);
#endif
#endif


1 change: 0 additions & 1 deletion include/rtdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,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)
Expand Down
5 changes: 1 addition & 4 deletions libcpu/arm/realview-a8-vmm/gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,7 @@ void arm_gic_dump(rt_uint32_t index)
}
rt_kprintf("\n");
}
#ifdef RT_USING_FINSH
#include <finsh.h>
FINSH_FUNCTION_EXPORT_ALIAS(arm_gic_dump, gic, show gic status);
#endif

Copy link
Member

@Rbb666 Rbb666 Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此 pr 请删除类似的多余的换行

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这类是否是要新启一个issue,再推给copilot?

@copilot 看看上面回复

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修复,已删除所有多余的换行。commit: 42aef81

Fixed, removed all extra blank lines. commit: 42aef81


int arm_gic_dist_init(rt_uint32_t index, rt_uint32_t dist_base, int irq_start)
{
Expand Down
Loading