Date: Sat, 17 Jul 2010 07:59:53 +0000 (UTC) From: Giorgos Keramidas <keramida@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r210190 - stable/7/usr.sbin/fifolog/lib Message-ID: <201007170759.o6H7xrG6066037@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: keramida (doc committer) Date: Sat Jul 17 07:59:53 2010 New Revision: 210190 URL: http://svn.freebsd.org/changeset/base/210190 Log: MFC r209871 from /head Fix reading of empty fifolog files. When we don't have anything to inflate, skip the rest of the fifolog reader code to avoid hitting the assert about Z_OK a bit further down. Modified: stable/7/usr.sbin/fifolog/lib/fifolog_reader.c Directory Properties: stable/7/usr.sbin/fifolog/ (props changed) Modified: stable/7/usr.sbin/fifolog/lib/fifolog_reader.c ============================================================================== --- stable/7/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 07:56:01 2010 (r210189) +++ stable/7/usr.sbin/fifolog/lib/fifolog_reader.c Sat Jul 17 07:59:53 2010 (r210190) @@ -299,8 +299,10 @@ fifolog_reader_process(struct fifolog_re if (i == Z_STREAM_END) { i = inflateReset(zs); } - if (i != Z_OK) + if (i != Z_OK) { fprintf(stderr, "inflate = %d\n", i); + exit (250); + } assert(i == Z_OK); if (zs->avail_out != fr->olen) { q = fr->obuf + (fr->olen - zs->avail_out);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007170759.o6H7xrG6066037>