Module Name:    src
Committed By:   christos
Date:           Sun Nov 11 01:42:36 UTC 2018

Modified Files:
        src/usr.bin/gzip: unlz.c

Log Message:
use the data size in case stdout was a pipe (M. Levinson)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.bin/gzip/unlz.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/gzip/unlz.c
diff -u src/usr.bin/gzip/unlz.c:1.5 src/usr.bin/gzip/unlz.c:1.6
--- src/usr.bin/gzip/unlz.c:1.5	Sun Oct 28 20:14:37 2018
+++ src/usr.bin/gzip/unlz.c	Sat Nov 10 20:42:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: unlz.c,v 1.5 2018/10/29 00:14:37 christos Exp $	*/
+/*	$NetBSD: unlz.c,v 1.6 2018/11/11 01:42:36 christos Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -575,7 +575,12 @@ lz_decode(int fin, int fdout, unsigned d
 	}
 	if (insize)
 		*insize = rv;
+#if 0
+	/* Does not work with pipes */
 	rv = ftello(lz.fout);
+#else
+	rv = data_size;
+#endif
 out:
 	lz_destroy(&lz);
 	return rv;

Reply via email to