Skip to content

Commit 78b6b6e

Browse files
authored
[finsh][shell] Print FinSH prompt with a fixed format string
1 parent e74547b commit 78b6b6e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

components/finsh/shell.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ static void finsh_thread_entry(void *parameter)
542542
finsh_wait_auth();
543543
#endif
544544

545-
rt_kprintf(FINSH_PROMPT);
545+
rt_kprintf("%s", FINSH_PROMPT);
546546

547547
while (1)
548548
{
@@ -842,7 +842,7 @@ static void finsh_thread_entry(void *parameter)
842842
rt_kprintf("\n");
843843
msh_exec(shell->line, shell->line_position);
844844

845-
rt_kprintf(FINSH_PROMPT);
845+
rt_kprintf("%s", FINSH_PROMPT);
846846
rt_memset(shell->line, 0, sizeof(shell->line));
847847
shell->line_curpos = shell->line_position = 0;
848848
continue;
@@ -1019,4 +1019,3 @@ int finsh_system_init(void)
10191019
INIT_APP_EXPORT(finsh_system_init);
10201020

10211021
#endif /* RT_USING_FINSH */
1022-

0 commit comments

Comments
 (0)