summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_hibernate.c
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2013-09-29 15:47:35 +0000
committermlarkin <mlarkin@openbsd.org>2013-09-29 15:47:35 +0000
commit39502a3302d650ccf6d5db2192e95b7fa16e8807 (patch)
treecaf54dba17407ff7efb7f17288739cc052e95465 /sys/kern/subr_hibernate.c
parentuse a more clearly named variable for the srandom case in the code (diff)
downloadwireguard-openbsd-39502a3302d650ccf6d5db2192e95b7fa16e8807.tar.xz
wireguard-openbsd-39502a3302d650ccf6d5db2192e95b7fa16e8807.zip
Print out the compressed image size during unhibernate, for diagnostic
purposes and to give the user an idea as to how much is going to be read in.
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r--sys/kern/subr_hibernate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c
index 0a5dead459d..61cec64182f 100644
--- a/sys/kern/subr_hibernate.c
+++ b/sys/kern/subr_hibernate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_hibernate.c,v 1.59 2013/06/01 19:06:34 mlarkin Exp $ */
+/* $OpenBSD: subr_hibernate.c,v 1.60 2013/09/29 15:47:35 mlarkin Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -1196,7 +1196,7 @@ hibernate_resume(void)
hibernate_quiesce_cpus();
#endif /* MULTIPROCESSOR */
- printf("Unhibernating...\n");
+ printf("Unhibernating...");
/* Read the image from disk into the image (pig) area */
if (hibernate_read_image(&disk_hiber_info))
@@ -1227,7 +1227,7 @@ hibernate_resume(void)
fail:
splx(s);
- printf("Unable to resume hibernated image\n");
+ printf("\nUnable to resume hibernated image\n");
}
/*
@@ -1637,6 +1637,8 @@ hibernate_read_image(union hibernate_info *hiber_info)
disk_size = compressed_size;
+ printf(" (image size: %zu)\n", compressed_size);
+
/* Allocate the pig area */
pig_sz = compressed_size + HIBERNATE_CHUNK_SIZE;
if (uvm_pmr_alloc_pig(&pig_start, pig_sz) == ENOMEM)