Replace EXIT_SUCCESS with 0 for BOARDIOC_[POWEROFF|RESET]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-01-29 01:21:53 +08:00
committed by Petro Karashchenko
parent 53cd8cda1f
commit f6f4bbff3a
2 changed files with 7 additions and 7 deletions

View File

@@ -285,7 +285,7 @@ int main(int argc, FAR char *argv[])
usleep(1000); usleep(1000);
boardctl(BOARDIOC_RESET, EXIT_SUCCESS); boardctl(BOARDIOC_RESET, 0);
return OK; return OK;
} }

View File

@@ -112,7 +112,7 @@ int cmd_shutdown(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* reset the board due to some constraints. * reset the board due to some constraints.
*/ */
boardctl(BOARDIOC_RESET, EXIT_SUCCESS); boardctl(BOARDIOC_RESET, 0);
} }
else 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. * to power-off the* board due to some constraints.
*/ */
boardctl(BOARDIOC_POWEROFF, EXIT_SUCCESS); boardctl(BOARDIOC_POWEROFF, 0);
} }
#elif defined(CONFIG_BOARDCTL_RESET) #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. * reset the board due to some constraints.
*/ */
boardctl(BOARDIOC_RESET, EXIT_SUCCESS); boardctl(BOARDIOC_RESET, 0);
#else #else
/* Only the reset behavior is supported and we already know that there is /* 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. * off the board due to some constraints.
*/ */
boardctl(BOARDIOC_POWEROFF, EXIT_SUCCESS); boardctl(BOARDIOC_POWEROFF, 0);
#endif #endif
/* boardctl() will not return in any case. It if does, it means that /* 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 else
{ {
boardctl(BOARDIOC_POWEROFF, EXIT_SUCCESS); boardctl(BOARDIOC_POWEROFF, 0);
} }
/* boardctl() will not return in any case. It if does, it means that /* 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 else
{ {
boardctl(BOARDIOC_RESET, EXIT_SUCCESS); boardctl(BOARDIOC_RESET, 0);
} }
/* boardctl() will not return in this case. It if does, it means that /* boardctl() will not return in this case. It if does, it means that