but complain about non-portability if > 32256 bytes.
Brought up by George Robbins <grr@shandakor.tharsis.com>
-/* $OpenBSD: buf_subs.c,v 1.3 1996/06/23 14:20:30 deraadt Exp $ */
+/* $OpenBSD: buf_subs.c,v 1.4 1997/04/06 06:11:10 millert Exp $ */
/* $NetBSD: buf_subs.c,v 1.5 1995/03/21 09:07:08 cgd Exp $ */
/*-
#if 0
static char sccsid[] = "@(#)buf_subs.c 8.2 (Berkeley) 4/18/94";
#else
-static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.3 1996/06/23 14:20:30 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: buf_subs.c,v 1.4 1997/04/06 06:11:10 millert Exp $";
#endif
#endif /* not lint */
wrblksz, BLKMULT);
return(-1);
}
+ if (wrblksz > MAXBLK_POSIX) {
+ paxwarn(0, "Write block size of %d larger than POSIX max %d, archive may not be portable",
+ wrblksz, MAXBLK_POSIX);
+ return(-1);
+ }
/*
* we only allow wrblksz to be used with all archive operations
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: cpio.1,v 1.2 1997/03/02 09:46:40 tholo Exp $
+.\" $OpenBSD: cpio.1,v 1.3 1997/04/06 06:11:11 millert Exp $
.\"
.Dd February 16, 1997
.Dt CPIO 1
.Nm cpio
.Nd copy file archives in and out
.Sh SYNOPSIS
-.Nm cpio
+.Nm
.Fl o
.Op Fl aABcLvzZ
.Op Fl C Ar bytes
.Op Fl O Ar archive
.Ar "< name-list"
.Op Ar "> archive"
-.Nm cpio
+.Nm
.Fl i
.Op Fl bBcdfmrsStuvzZ6
.Op Fl C Ar bytes
.Op Fl I Ar archive
.Op Ar "pattern ..."
.Op Ar "< archive"
-.Nm cpio
+.Nm
.Fl p
.Op Fl adlLmuv
.Ar destination-directory
-.\" $OpenBSD: pax.1,v 1.4 1997/02/20 06:54:35 tholo Exp $
+.\" $OpenBSD: pax.1,v 1.5 1997/04/06 06:11:13 millert Exp $
.\" $NetBSD: pax.1,v 1.3 1995/03/21 09:07:37 cgd Exp $
.\"
.\" Copyright (c) 1992 Keith Muller.
bytes per write to the archive file.
The
.Ar blocksize
-must be a multiple of 512 bytes with a maximum of 32256 bytes.
+must be a multiple of 512 bytes with a maximum of 64512 bytes.
+Archives larger than 32256 bytes violate the
+.Tn POSIX
+standard and will not be portable to all systems.
A
.Ar blocksize
can end with
-/* $OpenBSD: pax.h,v 1.7 1997/02/27 23:32:59 michaels Exp $ */
+/* $OpenBSD: pax.h,v 1.8 1997/04/06 06:11:14 millert Exp $ */
/* $NetBSD: pax.h,v 1.3 1995/03/21 09:07:41 cgd Exp $ */
/*-
* BSD PAX global data structures and constants.
*/
-#define MAXBLK 32256 /* MAX blocksize supported (posix SPEC) */
+#define MAXBLK 64512 /* MAX blocksize supported (posix SPEC) */
/* WARNING: increasing MAXBLK past 32256 */
/* will violate posix spec. */
+#define MAXBLK_POSIX 32256 /* MAX blocksize supported as per POSIX */
#define BLKMULT 512 /* blocksize must be even mult of 512 bytes */
/* Don't even think of changing this */
#define DEVBLK 8192 /* default read blksize for devices */
int bsz; /* default block size. used when the user */
/* does not specify a blocksize for writing */
/* Appends continue to with the blocksize */
- /* the archive is currently using.*/
+ /* the archive is currently using. */
int hsz; /* Header size in bytes. this is the size of */
/* the smallest header this format supports. */
/* Headers are assumed to fit in a BLKMULT. */
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: tar.1,v 1.8 1997/04/05 22:36:18 millert Exp $
+.\" $OpenBSD: tar.1,v 1.9 1997/04/06 06:11:16 millert Exp $
.\"
.Dd June 11, 1996
.Dt TAR 1
.It Fl b Ar "blocking factor"
Set blocking factor to use for the archive,
.Nm
-uses 512 byte blocks. The default is 20, the maximum is 63.
+uses 512 byte blocks. The default is 20, the maximum is 126.
+Archives with a blocking factor larger 63 violate the
+.Tn POSIX
+standard and will not be portable to all systems.
.It Fl e
Stop after first error.
.It Fl f Ar archive