diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2012-07-08 21:11:50 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2012-07-08 21:11:50 +0000 |
commit | 278c44eecaf753f04ee877caaa45ae02058f400b (patch) | |
tree | 2beaed6f5630ed896d5d85e8c02bf205bf7c695d /sys/kern/subr_hibernate.c | |
parent | 29310583e8c346c13e88afc2b883fb8fc6a0479e (diff) |
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(); |