From f6f4bbff3ae88eb779ef4c7f45e0cf7b4e6beb6b Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 29 Jan 2022 01:21:53 +0800 Subject: [PATCH] Replace EXIT_SUCCESS with 0 for BOARDIOC_[POWEROFF|RESET] Signed-off-by: Xiang Xiao --- boot/mcuboot/mcuboot_agent_main.c | 2 +- nshlib/nsh_syscmds.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boot/mcuboot/mcuboot_agent_main.c b/boot/mcuboot/mcuboot_agent_main.c index 6d8a100076..0a33b08b9d 100644 --- a/boot/mcuboot/mcuboot_agent_main.c +++ b/boot/mcuboot/mcuboot_agent_main.c @@ -285,7 +285,7 @@ int main(int argc, FAR char *argv[]) usleep(1000); - boardctl(BOARDIOC_RESET, EXIT_SUCCESS); + boardctl(BOARDIOC_RESET, 0); return OK; } diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c index c6cdf5b9d3..c68c1c12f8 100644 --- a/nshlib/nsh_syscmds.c +++ b/nshlib/nsh_syscmds.c @@ -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 { @@ -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) @@ -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 @@ -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 @@ -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 @@ -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