From: Yu Watanabe Date: Wed, 12 Jun 2024 09:28:33 +0000 (+0900) Subject: Merge pull request #32847 from YHNdnzj/exitrd X-Git-Tag: v257-rc1~1196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ef63b11aa380e3c734db151dd11eef1414bee7b;p=thirdparty%2Fsystemd.git Merge pull request #32847 from YHNdnzj/exitrd shutdown: several cleanups, rename initrd to exitrd --- 0ef63b11aa380e3c734db151dd11eef1414bee7b diff --cc src/shutdown/shutdown.c index d998bc5473a,c2b700aad14..46f22cfc69d --- a/src/shutdown/shutdown.c +++ b/src/shutdown/shutdown.c @@@ -561,16 -558,15 +558,18 @@@ int main(int argc, char *argv[]) } /* We're done with the watchdog. Note that the watchdog is explicitly not stopped here. It remains - * active to guard against any issues during the rest of the shutdown sequence. */ + * active to guard against any issues during the rest of the shutdown sequence. Note that we + * explicitly close the device with disarm=false here, before releasing the rest of the watchdog + * data. */ + watchdog_close(/* disarm= */ false); watchdog_free_device(); - arguments[0] = NULL; /* Filled in by execute_directories(), when needed */ - arguments[1] = arg_verb; - arguments[2] = NULL; - (void) execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, arguments, NULL, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS); + const char *arguments[] = { + NULL, /* Filled in by execute_directories(), when needed */ + arg_verb, + NULL, + }; + (void) execute_directories(dirs, DEFAULT_TIMEOUT_USEC, NULL, NULL, (char**) arguments, NULL, EXEC_DIR_PARALLEL | EXEC_DIR_IGNORE_ERRORS); (void) rlimit_nofile_safe();