diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-02-01 01:33:46 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-02-01 01:33:46 +0000 |
commit | a9ef0055d23c9d5f4840c2efb1c4585b5892f1ae (patch) | |
tree | a3a43a628b27560231730f22ef9f86388d916bc9 /sys | |
parent | 7b12440d78745a1e20fe95fabd4af86c4c148f09 (diff) |
call vfs_syncwait on standby and suspend
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/i386/i386/apm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/apm.c b/sys/arch/i386/i386/apm.c index 7f3f6477bd8..9fc494f388f 100644 --- a/sys/arch/i386/i386/apm.c +++ b/sys/arch/i386/i386/apm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apm.c,v 1.32 2000/01/31 21:09:36 mickey Exp $ */ +/* $OpenBSD: apm.c,v 1.33 2000/02/01 01:33:45 mickey Exp $ */ /*- * Copyright (c) 1998-2000 Michael Shalayeff. All rights reserved. @@ -51,6 +51,7 @@ #include <sys/device.h> #include <sys/fcntl.h> #include <sys/ioctl.h> +#include <sys/mount.h> /* for vfs_syncwait() proto */ #include <machine/conf.h> #include <machine/cpu.h> @@ -309,6 +310,8 @@ apm_suspend() { dopowerhooks(PWR_SUSPEND); + vfs_syncwait(0); + (void)apm_set_powstate(APM_DEV_ALLDEVS, APM_SYS_SUSPEND); } @@ -317,6 +320,8 @@ apm_standby() { dopowerhooks(PWR_STANDBY); + vfs_syncwait(0); + (void)apm_set_powstate(APM_DEV_ALLDEVS, APM_SYS_STANDBY); } |