diff --git a/services/begetctl/init_cmd_reboot.c b/services/begetctl/init_cmd_reboot.c index f4a248276351d2e644a566becd36c30ec1b3a22b..350443d63f57d2e5f00d04e9cc94ed7775d9512e 100755 --- a/services/begetctl/init_cmd_reboot.c +++ b/services/begetctl/init_cmd_reboot.c @@ -61,7 +61,8 @@ static int main_cmd(int argc, char* argv[]) return 0; } -MODULE_CONSTRUCTOR() { +MODULE_CONSTRUCTOR() +{ (void)BegetCtlCmdAdd("reboot", main_cmd); (void)BegetCtlCmdAdd("devctl", main_cmd); } diff --git a/services/begetctl/main.c b/services/begetctl/main.c index ed0ddfd5410f6853868559ade539daeb52dfc92c..7be7e71359aa97252d4b7f25760bfce04d4e9b53 100755 --- a/services/begetctl/main.c +++ b/services/begetctl/main.c @@ -26,7 +26,8 @@ struct CMD_LIST_ST { static struct CMD_LIST_ST *m_cmdList = NULL; -int BegetCtlCmdAdd(const char *name, BegetCtlCmdPtr cmd) { +int BegetCtlCmdAdd(const char *name, BegetCtlCmdPtr cmd) +{ struct CMD_LIST_ST *item; if (name == NULL) { @@ -51,7 +52,8 @@ int BegetCtlCmdAdd(const char *name, BegetCtlCmdPtr cmd) { return 0; } -static const struct CMD_LIST_ST *BegetCtlCmdFind(const char *name) { +static const struct CMD_LIST_ST *BegetCtlCmdFind(const char *name) +{ const struct CMD_LIST_ST *item = m_cmdList; while (item != NULL) { @@ -63,7 +65,8 @@ static const struct CMD_LIST_ST *BegetCtlCmdFind(const char *name) { return NULL; } -static void BegetCtlUsage(const char *command) { +static void BegetCtlUsage(const char *command) +{ const struct CMD_LIST_ST *item = m_cmdList; int notFirst = 0; @@ -78,7 +81,8 @@ static void BegetCtlUsage(const char *command) { printf("\n"); } -int main(int argc, char **argv) { +int main(int argc, char **argv) +{ const struct CMD_LIST_ST *cmd; const char *last = strrchr(argv[0], '/'); diff --git a/services/begetctl/misc_daemon.cpp b/services/begetctl/misc_daemon.cpp index e8798655cd88a5a8c0bca4d8ecbc07c0c5a001ba..bcb867f34135c0736350bb8b8c249ee24242202f 100755 --- a/services/begetctl/misc_daemon.cpp +++ b/services/begetctl/misc_daemon.cpp @@ -244,6 +244,7 @@ static int main_cmd(int argc, char **argv) return 0; } -MODULE_CONSTRUCTOR() { +MODULE_CONSTRUCTOR() +{ (void)BegetCtlCmdAdd("misc_deamon", main_cmd); } diff --git a/services/begetctl/param_cmd.c b/services/begetctl/param_cmd.c index 5a93d21544535f9e8285bdfbec6abe158e701c6f..d1e37e7f16eb08c3c194f09a61980607acda65cd 100755 --- a/services/begetctl/param_cmd.c +++ b/services/begetctl/param_cmd.c @@ -191,7 +191,8 @@ static int main_cmd(int argc, char *argv[]) return RunParamCommand(argc, argv); } -MODULE_CONSTRUCTOR() { +MODULE_CONSTRUCTOR() +{ (void)BegetCtlCmdAdd("param", main_cmd); } #endif diff --git a/services/begetctl/service_control.c b/services/begetctl/service_control.c index ec117c30fece9752115a4b86d5d4f932be3c7628..52d70fff8bed1702121bd5b7362cbd1d5151dc66 100755 --- a/services/begetctl/service_control.c +++ b/services/begetctl/service_control.c @@ -92,7 +92,8 @@ static int main_cmd(int argc, char** argv) return 0; } -MODULE_CONSTRUCTOR() { +MODULE_CONSTRUCTOR() +{ (void)BegetCtlCmdAdd("service", main_cmd); (void)BegetCtlCmdAdd("service_control", main_cmd); (void)BegetCtlCmdAdd("start_service", main_cmd);