Skip to content

Commit e18d449

Browse files
committed
[finsh] 修复由于移除finsh导致__cmd_xxx命令无法使用的问题
1 parent 3106187 commit e18d449

File tree

30 files changed

+41
-63
lines changed

30 files changed

+41
-63
lines changed

bsp/at91sam9260/platform/interrupt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,14 @@ void list_irq(void)
413413
}
414414

415415
#include <finsh.h>
416-
FINSH_FUNCTION_EXPORT(list_irq, list system irq);
417416

418417
#ifdef FINSH_USING_MSH
419418
int cmd_list_irq(int argc, char** argv)
420419
{
421420
list_irq();
422421
return 0;
423422
}
424-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_list_irq, __cmd_list_irq, list system irq.);
425-
423+
MSH_CMD_EXPORT_ALIAS(cmd_list_irq, list_irq, list system irq);
426424
#endif
427425
#endif
428426
#endif

bsp/at91sam9260/platform/reset.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,14 @@ int cmd_reset(int argc, char** argv)
3838
rt_hw_cpu_reset();
3939
return 0;
4040
}
41+
MSH_CMD_EXPORT_ALIAS(cmd_reset, reset, restart the system);
4142

4243
int cmd_shutdown(int argc, char** argv)
4344
{
4445
rt_hw_cpu_shutdown();
4546
return 0;
4647
}
47-
48-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_reset, __cmd_reset, restart the system.);
49-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_shutdown, __cmd_shutdown, shutdown the system.);
48+
MSH_CMD_EXPORT_ALIAS(cmd_shutdown, shutdown, shutdown the system);
5049

5150
#endif
5251
#endif

bsp/at91sam9g45/platform/interrupt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,14 @@ void list_irq(void)
445445
}
446446

447447
#include <finsh.h>
448-
FINSH_FUNCTION_EXPORT(list_irq, list system irq);
449448

450449
#ifdef FINSH_USING_MSH
451450
int cmd_list_irq(int argc, char** argv)
452451
{
453452
list_irq();
454453
return 0;
455454
}
456-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_list_irq, __cmd_list_irq, list system irq.);
457-
455+
MSH_CMD_EXPORT_ALIAS(cmd_list_irq, list_irq, list system irq);
458456
#endif
459457
#endif
460458
#endif

bsp/at91sam9g45/platform/reset.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,21 @@ void machine_shutdown(void)
3030
#ifdef RT_USING_FINSH
3131

3232
#include <finsh.h>
33-
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reset, restart the system);
3433

3534
#ifdef FINSH_USING_MSH
3635
int cmd_reset(int argc, char** argv)
3736
{
3837
rt_hw_cpu_reset();
3938
return 0;
4039
}
40+
MSH_CMD_EXPORT_ALIAS(cmd_reset, reset, restart the system);
4141

4242
int cmd_shutdown(int argc, char** argv)
4343
{
4444
rt_hw_cpu_shutdown();
4545
return 0;
4646
}
47-
48-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_reset, __cmd_reset, restart the system.);
49-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_shutdown, __cmd_shutdown, shutdown the system.);
47+
MSH_CMD_EXPORT_ALIAS(cmd_shutdown, shutdown, shutdown the system);
5048

5149
#endif
5250
#endif

bsp/beaglebone/applications/board.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,5 +163,4 @@ void rt_hw_cpu_reset(void)
163163
REG32(PRM_DEVICE(prcm_base)) = 0x1;
164164
RT_ASSERT(0);
165165
}
166-
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reboot the cpu);
167-
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, __cmd_reboot, reboot the cpu);
166+
MSH_CMD_EXPORT_ALIAS(rt_hw_cpu_reset, reboot, reboot the cpu);

bsp/dm365/drivers/davinci_emac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ int cmd_dump_emac_stats(int argc, char** argv)
17511751
dump_emac_stats();
17521752
return 0;
17531753
}
1754-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_dump_emac_stats, __cmd_dump_emac_stats, dump emac statistics.);
1754+
MSH_CMD_EXPORT_ALIAS(cmd_dump_emac_stats, dump_emac_stats, dump emac statistics);
17551755
#endif
17561756

17571757
#endif

bsp/dm365/platform/interrupt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,7 @@ int cmd_list_irq(int argc, char** argv)
286286
list_irq();
287287
return 0;
288288
}
289-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_list_irq, __cmd_list_irq, list system irq.);
290-
289+
MSH_CMD_EXPORT_ALIAS(cmd_list_irq, list_irq, list system irq);
291290
#endif
292291
#endif
293292
#endif

bsp/dm365/platform/reset.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,21 @@ void machine_shutdown()
3939
#ifdef RT_USING_FINSH
4040

4141
#include <finsh.h>
42-
FINSH_FUNCTION_EXPORT_ALIAS(rt_hw_cpu_reset, reset, restart the system);
4342

4443
#ifdef FINSH_USING_MSH
4544
int cmd_reset(int argc, char** argv)
4645
{
4746
rt_hw_cpu_reset();
4847
return 0;
4948
}
49+
MSH_CMD_EXPORT_ALIAS(cmd_reset, reset, restart the system);
5050

5151
int cmd_shutdown(int argc, char** argv)
5252
{
5353
rt_hw_cpu_shutdown();
5454
return 0;
5555
}
56-
57-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_reset, __cmd_reset, restart the system.);
58-
FINSH_FUNCTION_EXPORT_ALIAS(cmd_shutdown, __cmd_shutdown, shutdown the system.);
56+
MSH_CMD_EXPORT_ALIAS(cmd_shutdown, shutdown, shutdown the system);
5957

6058
#endif
6159
#endif

bsp/fm33lc026/libraries/HAL_Drivers/drv_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ static void reboot(uint8_t argc, char **argv)
2222
{
2323
rt_hw_cpu_reset();
2424
}
25-
FINSH_FUNCTION_EXPORT_ALIAS(reboot, __cmd_reboot, Reboot System);
25+
MSH_CMD_EXPORT(reboot, reboot system);
2626
#endif /* RT_USING_FINSH */
2727

2828
/* SysTick configuration */

bsp/hk32/hk32f030c8-mini/board/board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static void reboot(uint8_t argc, char **argv)
2121
{
2222
rt_hw_cpu_reset();
2323
}
24-
FINSH_FUNCTION_EXPORT_ALIAS(reboot, __cmd_reboot, Reboot System);
24+
MSH_CMD_EXPORT(reboot, reboot system);
2525
#endif /* RT_USING_FINSH */
2626

2727
/** System Clock Configuration

0 commit comments

Comments
 (0)