Skip to content

Commit

Permalink
Replace EXIT_SUCCESS with 0 for BOARDIOC_[POWEROFF|RESET]
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
  • Loading branch information
xiaoxiang781216 authored and pkarashchenko committed Jan 29, 2022
1 parent 53cd8cd commit f6f4bbf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion boot/mcuboot/mcuboot_agent_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ int main(int argc, FAR char *argv[])

usleep(1000);

boardctl(BOARDIOC_RESET, EXIT_SUCCESS);
boardctl(BOARDIOC_RESET, 0);

return OK;
}
12 changes: 6 additions & 6 deletions nshlib/nsh_syscmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int cmd_shutdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* reset the board due to some constraints.
*/

boardctl(BOARDIOC_RESET, EXIT_SUCCESS);
boardctl(BOARDIOC_RESET, 0);
}
else
{
Expand All @@ -121,7 +121,7 @@ int cmd_shutdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* to power-off the* board due to some constraints.
*/

boardctl(BOARDIOC_POWEROFF, EXIT_SUCCESS);
boardctl(BOARDIOC_POWEROFF, 0);
}

#elif defined(CONFIG_BOARDCTL_RESET)
Expand All @@ -142,7 +142,7 @@ int cmd_shutdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* reset the board due to some constraints.
*/

boardctl(BOARDIOC_RESET, EXIT_SUCCESS);
boardctl(BOARDIOC_RESET, 0);

#else
/* Only the reset behavior is supported and we already know that there is
Expand All @@ -154,7 +154,7 @@ int cmd_shutdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* off the board due to some constraints.
*/

boardctl(BOARDIOC_POWEROFF, EXIT_SUCCESS);
boardctl(BOARDIOC_POWEROFF, 0);
#endif

/* boardctl() will not return in any case. It if does, it means that
Expand Down Expand Up @@ -277,7 +277,7 @@ int cmd_poweroff(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
}
else
{
boardctl(BOARDIOC_POWEROFF, EXIT_SUCCESS);
boardctl(BOARDIOC_POWEROFF, 0);
}

/* boardctl() will not return in any case. It if does, it means that
Expand Down Expand Up @@ -307,7 +307,7 @@ int cmd_reboot(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
}
else
{
boardctl(BOARDIOC_RESET, EXIT_SUCCESS);
boardctl(BOARDIOC_RESET, 0);
}

/* boardctl() will not return in this case. It if does, it means that
Expand Down

0 comments on commit f6f4bbf

Please sign in to comment.