From 57371e5829a61e5ee6c9f98404dfc729d6c62608 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 5 Sep 2012 15:32:57 -0700 Subject: shutdown: remove explicit sync() invocations The kernel implicitly does sync() anyway, hence there is no need to do that in userspace explicitly. This makes the "-n" switch to halt(8) a noop. --- src/core/shutdown.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/core/shutdown.c') diff --git a/src/core/shutdown.c b/src/core/shutdown.c index c3a4c390be..558111b3d4 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -279,8 +279,6 @@ int main(int argc, char *argv[]) { } } - sync(); - if (cmd == LINUX_REBOOT_CMD_KEXEC) { /* We cheat and exec kexec to avoid doing all its work */ pid_t pid = fork(); -- cgit v1.2.3-54-g00ecf