mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-28 17:10:23 +00:00
systemctl: when invokes as "reboot -f", sync()
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too.
(cherry picked from commit 4a3ad39957)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
c4b4b03e15
commit
4ce940e9a4
@@ -6948,8 +6948,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) {
|
||||
|
||||
Reference in New Issue
Block a user