Subject: Re: gzip warning about > 4GB breaks amanda
To: None <current-users@NetBSD.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: current-users
Date: 11/18/2005 08:10:52
I'm currently testing the following patch, which makes the message a
warning only (no exit status change). Also, this should be warnx,
since errno is not relevant. I intend to commit this if it works ok;
please let me know of any objections.
Index: gzip.c
===================================================================
RCS file: /cvsroot/src/usr.bin/gzip/gzip.c,v
retrieving revision 1.77
diff -u -r1.77 gzip.c
--- gzip.c 20 Sep 2005 05:12:15 -0000 1.77
+++ gzip.c 18 Nov 2005 12:38:03 -0000
@@ -639,8 +639,9 @@
(int)(in_tot >> 24) & 0xff);
if (i != 8)
maybe_err("snprintf");
- if (in_tot > 0xffffffff)
- maybe_warn("input file size >= 4GB cannot be saved");
+ if (in_tot > 0xffffffff && qflag == 0)
+ /* Do not set exit status to 1. */
+ warn("input file size >= 4GB cannot be saved");
if (write(out, outbufp, i) != i) {
maybe_warn("write");
in_tot = -1;
--
Greg Troxel <gdt@ir.bbn.com>