summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2017-08-17 06:50:42 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2017-08-17 06:50:42 +0000
commit9d0fc706ebd2758be826904257234470eec6d9c3 (patch)
tree5646917458b0250bd8670d21a735f20d6a254dbe /sys
parent2349e705e2fbaa18c56186a4e7321fbe282cc99e (diff)
print why the signature block check of an unhibernate attempt failed, to
let people know what changed. ok kettenis, phessler
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_hibernate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c
index 1cc4ed2f6cd..3c946e8ea75 100644
--- a/sys/kern/subr_hibernate.c
+++ b/sys/kern/subr_hibernate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_hibernate.c,v 1.122 2017/06/22 15:56:29 deraadt Exp $ */
+/* $OpenBSD: subr_hibernate.c,v 1.123 2017/08/17 06:50:41 mlarkin Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -930,18 +930,17 @@ hibernate_compare_signature(union hibernate_info *mine,
u_int i;
if (mine->nranges != disk->nranges) {
- DPRINTF("hibernate memory range count mismatch\n");
+ printf("unhibernate failed: memory layout changed\n");
return (1);
}
if (strcmp(mine->kernel_version, disk->kernel_version) != 0) {
- DPRINTF("hibernate kernel version mismatch\n");
+ printf("unhibernate failed: original kernel changed\n");
return (1);
}
if (hibsum() != disk->kernel_sum) {
- DPRINTF("hibernate sum version mismatch %x %x\n",
- hibsum(), disk->kernel_sum);
+ printf("unhibernate failed: original kernel changed\n");
return (1);
}
@@ -954,6 +953,7 @@ hibernate_compare_signature(union hibernate_info *mine,
(void *)mine->ranges[i].end,
(void *)disk->ranges[i].base,
(void *)disk->ranges[i].end);
+ printf("unhibernate failed: memory size changed\n");
return (1);
}
}