Skip to content

Commit

Permalink
apps/shell/tash_main.c: Fix board sleep during TASH password input
Browse files Browse the repository at this point in the history
Issue: Fail TASH input when secured TASH is enabled.
Cause: Open tash_pm_open_driver after tash_check_security
Solve: Move tash_pm_open_driver before tash_check_security

Signed-off-by: Jaeyong Lee <[email protected]>
  • Loading branch information
jylee9613 authored and jeongarmy committed Nov 14, 2024
1 parent 419df78 commit 365e87d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/shell/tash_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,17 @@ static int tash_main(int argc, char *argv[])
exit(EXIT_FAILURE);
}

#ifdef CONFIG_PM
/* Open PM Driver to perform pm operations inside tash_read_input_line */
tash_pm_open_driver();
#endif

#ifdef CONFIG_SECURED_TASH
tash_check_security(fd);
#endif

tash_running = TRUE;

#ifdef CONFIG_PM
/* Open PM Driver to perform pm operations inside tash_read_input_line */
tash_pm_open_driver();
#endif
do {
nbytes = write(fd, (const void *)TASH_PROMPT, sizeof(TASH_PROMPT));
if (nbytes <= 0) {
Expand Down

0 comments on commit 365e87d

Please sign in to comment.