From b5dfe2ff57f6bb8dd782909a4f5d7d7baeb4d039 Mon Sep 17 00:00:00 2001 From: Kiita Date: Thu, 29 Jul 2021 16:52:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20reboot=E5=91=BD=E4=BB=A4=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【背景】流水线需求reboot命令来重启系统 【修改方案】 修改reboot参数限制问题。 解决reboot命令不在toybox列表中的问题。 re #I436CH Signed-off-by: yansira Change-Id: I3d91749616fb80582535641607759da9635099e6 --- porting/liteos_a/toys/other/reboot.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/porting/liteos_a/toys/other/reboot.c b/porting/liteos_a/toys/other/reboot.c index 41becd2..948626e 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]); } -- Gitee