summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_hibernate.c
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2013-11-09 06:54:00 +0000
committermlarkin <mlarkin@openbsd.org>2013-11-09 06:54:00 +0000
commitc085ccbfa71c8602502d647a3b910bc436178165 (patch)
tree710108e2c7ea07611195c841bd7cd7e2b984ce77 /sys/kern/subr_hibernate.c
parentAdd KASSERT()s to tsleep() and msleep() to verify that bogus flags (diff)
downloadwireguard-openbsd-c085ccbfa71c8602502d647a3b910bc436178165.tar.xz
wireguard-openbsd-c085ccbfa71c8602502d647a3b910bc436178165.zip
Remove hibernate_get_next_rle function (unused, and we need to redo it
anyway as we move toward a streamed implmentation)
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r--sys/kern/subr_hibernate.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c
index 4e3dfcba006..9ec1dfea257 100644
--- a/sys/kern/subr_hibernate.c
+++ b/sys/kern/subr_hibernate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_hibernate.c,v 1.79 2013/11/09 04:38:42 deraadt Exp $ */
+/* $OpenBSD: subr_hibernate.c,v 1.80 2013/11/09 06:54:00 mlarkin Exp $ */
/*
* Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl>
@@ -763,42 +763,6 @@ hibernate_zlib_free(void *unused, void *addr)
}
/*
- * Gets the next RLE value from the image stream
- */
-int
-hibernate_get_next_rle(void)
-{
- int rle, i;
- struct hibernate_zlib_state *hibernate_state;
-
- hibernate_state =
- (struct hibernate_zlib_state *)HIBERNATE_HIBALLOC_PAGE;
-
- /* Read RLE code */
- hibernate_state->hib_stream.next_out = (char *)&rle;
- hibernate_state->hib_stream.avail_out = sizeof(rle);
-
- i = inflate(&hibernate_state->hib_stream, Z_FULL_FLUSH);
- if (i != Z_OK && i != Z_STREAM_END) {
- /*
- * XXX - this will likely reboot/hang most machines
- * since the console output buffer will be unmapped,
- * but there's not much else we can do here.
- */
- panic("inflate rle error");
- }
-
- /* Sanity check what RLE value we got */
- if (rle > HIBERNATE_CHUNK_SIZE/PAGE_SIZE || rle < 0)
- panic("invalid RLE code");
-
- if (i == Z_STREAM_END)
- rle = -1;
-
- return rle;
-}
-
-/*
* Inflate next page of data from the image stream
*/
int