From: mlarkin Date: Wed, 21 May 2014 02:26:49 +0000 (+0000) Subject: Change use of Z_PARTIAL_FLUSH to Z_SYNC_FLUSH in the hibernate code as per X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=527cac003209f96d7b0650da8a2d659c1b0cd4e3;p=openbsd Change use of Z_PARTIAL_FLUSH to Z_SYNC_FLUSH in the hibernate code as per a warning/comment in zlib.h that Z_PARTIAL_FLUSH "will be removed, use Z_SYNC_FLUSH instead". --- diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c index fc8ed07d599..1916ee88b85 100644 --- a/sys/kern/subr_hibernate.c +++ b/sys/kern/subr_hibernate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_hibernate.c,v 1.89 2014/04/26 05:43:00 mlarkin Exp $ */ +/* $OpenBSD: subr_hibernate.c,v 1.90 2014/05/21 02:26:49 mlarkin Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt @@ -777,7 +777,7 @@ hibernate_inflate_page(void) hibernate_state->hib_stream.avail_out = PAGE_SIZE; /* Process next block of data */ - i = inflate(&hibernate_state->hib_stream, Z_PARTIAL_FLUSH); + i = inflate(&hibernate_state->hib_stream, Z_SYNC_FLUSH); if (i != Z_OK && i != Z_STREAM_END) { /* * XXX - this will likely reboot/hang most machines @@ -868,7 +868,7 @@ hibernate_deflate(union hibernate_info *hib, paddr_t src, hibernate_state->hib_stream.avail_out = *remaining; /* Process next block of data */ - if (deflate(&hibernate_state->hib_stream, Z_PARTIAL_FLUSH) != Z_OK) + if (deflate(&hibernate_state->hib_stream, Z_SYNC_FLUSH) != Z_OK) panic("hibernate zlib deflate error"); /* Update pointers and return number of bytes consumed */