chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25fa306
)
systemctl: when invokes as "reboot -f", sync()
author
Lennart Poettering
<lennart@poettering.net>
Thu, 6 Nov 2014 14:20:29 +0000
(15:20 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 6 Nov 2014 14:20:29 +0000
(15:20 +0100)
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too.
src/systemctl/systemctl.c
patch
|
blob
|
history
diff --git
a/src/systemctl/systemctl.c
b/src/systemctl/systemctl.c
index 8a3e203e9e55261f81121c790fc64b143fb47359..d9e9c2a6c32087b1c9b955fe3461f0242b7fa934 100644
(file)
--- a/
src/systemctl/systemctl.c
+++ b/
src/systemctl/systemctl.c
@@
-7001,8
+7001,13
@@
done:
static int halt_now(enum action a) {
-/* Make sure C-A-D is handled by the kernel from this
- * point on... */
+ /* The kernel will automaticall flush ATA disks and suchlike
+ * on reboot(), but the file systems need to be synce'd
+ * explicitly in advance. */
+ sync();
+
+ /* Make sure C-A-D is handled by the kernel from this point
+ * on... */
reboot(RB_ENABLE_CAD);
switch (a) {