mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-27 10:25:06 +03: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.
This commit is contained in:
parent
25fa306ed5
commit
4a3ad39957
@ -7001,8 +7001,13 @@ done:
|
|||||||
|
|
||||||
static int halt_now(enum action a) {
|
static int halt_now(enum action a) {
|
||||||
|
|
||||||
/* Make sure C-A-D is handled by the kernel from this
|
/* The kernel will automaticall flush ATA disks and suchlike
|
||||||
* point on... */
|
* 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);
|
reboot(RB_ENABLE_CAD);
|
||||||
|
|
||||||
switch (a) {
|
switch (a) {
|
||||||
|
Loading…
Reference in New Issue
Block a user