Subject: Re: gzip warning about > 4GB breaks amanda
To: Greg Troxel <gdt@ir.bbn.com>
From: Mike M. Volokhov <mishka@apk.od.ua>
List: current-users
Date: 11/18/2005 15:37:54
On 18 Nov 2005 08:10:52 -0500
Greg Troxel <gdt@ir.bbn.com> wrote:
> 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.
Let this annoying bug be fixed finally. Hallelujah!
> 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;
>
Please see also bin/31346 (with alternative patch), and don't forgot to
close bin/32105 after fixing that.
Good luck!
--
Mishka.