diff options
author | 2012-07-08 21:11:49 +0000 | |
---|---|---|
committer | 2012-07-08 21:11:49 +0000 | |
commit | 7c9ea1f9d77ca6f94c87b4552b9bfb088183b889 (patch) | |
tree | 539b6519a3adf43f7c9ac53bb1e1309a87efd2e5 /sys/kern/subr_hibernate.c | |
parent | These files contain OpenBSD and Mdocdate keywords (diff) | |
download | wireguard-openbsd-7c9ea1f9d77ca6f94c87b4552b9bfb088183b889.tar.xz wireguard-openbsd-7c9ea1f9d77ca6f94c87b4552b9bfb088183b889.zip |
Quiesce and suspend devices in the resuming kernel for hibernate.
ok deraadt@
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r-- | sys/kern/subr_hibernate.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c index 23d1dba89b6..673df70751b 100644 --- a/sys/kern/subr_hibernate.c +++ b/sys/kern/subr_hibernate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_hibernate.c,v 1.38 2012/07/08 14:29:52 deraadt Exp $ */ +/* $OpenBSD: subr_hibernate.c,v 1.39 2012/07/08 21:11:49 mlarkin Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl> @@ -1111,6 +1111,12 @@ hibernate_resume(void) if (hibernate_read_image(&disk_hiber_info)) goto fail; + if (config_suspend(TAILQ_FIRST(&alldevs), DVACT_QUIESCE) != 0) + goto fail; + + if (config_suspend(TAILQ_FIRST(&alldevs), DVACT_SUSPEND) != 0) + goto fail; + /* Point of no return ... */ disable_intr(); |