Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/gzip port across the change from freebsd rev 290024:
details: https://anonhg.NetBSD.org/src/rev/e1e09455e9b7
branches: trunk
changeset: 341227:e1e09455e9b7
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Oct 27 07:36:18 2015 +0000
description:
port across the change from freebsd rev 290024:
In gunzip(1), treat trailing garbage as a warning and not an error. This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.
Update manual page for the behavior change.
PR: bin/203873
Submitted by: Eugene Grosbein <eugen grosbein net>
MFC after: 2 weeks
diffstat:
usr.bin/gzip/gzip.1 | 10 ++++++++--
usr.bin/gzip/gzip.c | 5 +++--
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (57 lines):
diff -r a4fde971164b -r e1e09455e9b7 usr.bin/gzip/gzip.1
--- a/usr.bin/gzip/gzip.1 Tue Oct 27 07:16:00 2015 +0000
+++ b/usr.bin/gzip/gzip.1 Tue Oct 27 07:36:18 2015 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: gzip.1,v 1.25 2015/04/06 21:41:17 wiz Exp $
+.\" $NetBSD: gzip.1,v 1.26 2015/10/27 07:36:18 mrg Exp $
.\"
.\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd April 6, 2015
+.Dd October 26, 2015
.Dt GZIP 1
.Os
.Sh NAME
@@ -169,6 +169,12 @@
handled before any options on the command line.
Options on the command line will override anything in
.Ev GZIP .
+.Sh EXIT STATUS
+The
+.Nm
+utility exits 0 on success,
+1 on errors,
+and 2 if a warning occurs.
.Sh SEE ALSO
.Xr bzip2 1 ,
.Xr compress 1 ,
diff -r a4fde971164b -r e1e09455e9b7 usr.bin/gzip/gzip.c
--- a/usr.bin/gzip/gzip.c Tue Oct 27 07:16:00 2015 +0000
+++ b/usr.bin/gzip/gzip.c Tue Oct 27 07:36:18 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gzip.c,v 1.108 2015/04/15 02:29:12 christos Exp $ */
+/* $NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $ */
/*
* Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -30,7 +30,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\
Matthew R. Green. All rights reserved.");
-__RCSID("$NetBSD: gzip.c,v 1.108 2015/04/15 02:29:12 christos Exp $");
+__RCSID("$NetBSD: gzip.c,v 1.109 2015/10/27 07:36:18 mrg Exp $");
#endif /* not lint */
/*
@@ -788,6 +788,7 @@
goto stop;
}
maybe_warnx("input not gziped (MAGIC0)");
+ exit_value = 2;
goto stop_and_fail;
}
ADVANCE();
Home |
Main Index |
Thread Index |
Old Index