summaryrefslogtreecommitdiff
path: root/src/core/shutdown.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-05 15:32:57 -0700
committerLennart Poettering <lennart@poettering.net>2012-09-05 15:32:57 -0700
commit57371e5829a61e5ee6c9f98404dfc729d6c62608 (patch)
tree5ad0f67db34b8571d575664b3e1072a5910ff065 /src/core/shutdown.c
parent3eabccc46c003d129a847ba423a6d0ba778e4930 (diff)
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.
Diffstat (limited to 'src/core/shutdown.c')
-rw-r--r--src/core/shutdown.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index c3a4c390b..558111b3d 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();