From: millert Date: Mon, 10 Feb 1997 06:48:15 +0000 (+0000) Subject: Permit single block trailers differently. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7a4893b909bc26007030059ae8efdcbc1977cc3c;p=openbsd Permit single block trailers differently. --- diff --git a/bin/pax/tar.c b/bin/pax/tar.c index ff18a556700..302b6e862d7 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.4 1996/08/27 03:53:14 tholo Exp $ */ +/* $OpenBSD: tar.c,v 1.5 1997/02/10 06:48:16 millert Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: tar.c,v 1.4 1996/08/27 03:53:14 tholo Exp $"; +static char rcsid[] = "$OpenBSD: tar.c,v 1.5 1997/02/10 06:48:16 millert Exp $"; #endif #endif /* not lint */ @@ -157,7 +157,7 @@ tar_trail(buf, in_resync, cnt) * might as well throw this block out since a valid header can NEVER be * a block of all 0 (we must have a valid file name). */ - if (!in_resync && (++*cnt >= NULLCNT)) + if (!in_resync) return(0); return(1); } diff --git a/bin/pax/tar.h b/bin/pax/tar.h index a13a5ef47d7..f4cbbd54311 100644 --- a/bin/pax/tar.h +++ b/bin/pax/tar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.h,v 1.3 1997/02/10 06:35:39 millert Exp $ */ +/* $OpenBSD: tar.h,v 1.4 1997/02/10 06:48:15 millert Exp $ */ /* $NetBSD: tar.h,v 1.3 1995/03/21 09:07:51 cgd Exp $ */ /*- @@ -46,7 +46,7 @@ #define CHK_LEN 8 /* length of checksum field */ #define TNMSZ 100 /* size of name field */ #ifdef _PAX_ -#define NULLCNT 1 /* number of null blocks in trailer */ +#define NULLCNT 2 /* number of null blocks in trailer */ #define CHK_OFFSET 148 /* start of chksum field */ #define BLNKSUM 256L /* sum of checksum field using ' ' */ #endif /* _PAX_ */