diff --git a/porting/liteos_a/toys/other/reboot.c b/porting/liteos_a/toys/other/reboot.c index 41becd2ad62308ae7c862a4c2ce5dc631f1e7695..948626e9e84e75252c2324c7b744cd9f8fcf3c4f 100644 --- a/porting/liteos_a/toys/other/reboot.c +++ b/porting/liteos_a/toys/other/reboot.c @@ -2,7 +2,7 @@ * * Copyright 2013 Elie De Brauwer -USE_RESET(NEWTOY(reboot, "n", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) +USE_REBOOT(NEWTOY(reboot, "", TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config REBOOT bool "reboot" @@ -22,9 +22,6 @@ void reboot_main(void) int types[] = {RB_AUTOBOOT, RB_HALT_SYSTEM, RB_POWER_OFF}, sigs[] = {SIGTERM, SIGUSR1, SIGUSR2}, idx; - if (!*toys.optargs) help_exit("missing argument"); - if (!(toys.optflags & FLAG_n)) sync(); - idx = stridx("hp", *toys.which->name)+1; toys.exitval = reboot(types[idx]); }