diff options
author | 2012-07-15 16:09:14 +0000 | |
---|---|---|
committer | 2012-07-15 16:09:14 +0000 | |
commit | 3874878259bf52be5a7b0c98dc6f393ad325abe1 (patch) | |
tree | aef77e6ed9510d863a03ebc3d0348862d82547bc /sys/kern/subr_hibernate.c | |
parent | sync (diff) | |
download | wireguard-openbsd-3874878259bf52be5a7b0c98dc6f393ad325abe1.tar.xz wireguard-openbsd-3874878259bf52be5a7b0c98dc6f393ad325abe1.zip |
Don't panic in hibernate resume if no swap partition exists on the root disk.
ok mlarkin
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r-- | sys/kern/subr_hibernate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c index 7f585ebdb13..8615214d58f 100644 --- a/sys/kern/subr_hibernate.c +++ b/sys/kern/subr_hibernate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_hibernate.c,v 1.42 2012/07/12 09:44:09 mlarkin Exp $ */ +/* $OpenBSD: subr_hibernate.c,v 1.43 2012/07/15 16:09:14 stsp Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl> @@ -1082,8 +1082,10 @@ hibernate_resume(void) if (hibernate_block_io(&hiber_info, hiber_info.sig_offset - hiber_info.swap_offset, - hiber_info.secsize, (vaddr_t)&disk_hiber_info, 0)) - panic("error in hibernate read"); + hiber_info.secsize, (vaddr_t)&disk_hiber_info, 0)) { + printf("error in hibernate read\n"); + goto fail; + } /* * If on-disk and in-memory hibernate signatures match, |