From 23853f2ffd250db86274da703871463a78a8a4ac Mon Sep 17 00:00:00 2001 From: millert Date: Wed, 26 Mar 1997 01:14:13 +0000 Subject: [PATCH] Blocking factor in tar is in 512byte blocks. Makes -b act like ``real'' tars. --- bin/pax/options.c | 7 ++++--- bin/pax/tar.1 | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/pax/options.c b/bin/pax/options.c index 59f9059bd70..66d565fc341 100644 --- a/bin/pax/options.c +++ b/bin/pax/options.c @@ -1,4 +1,4 @@ -/* $OpenBSD: options.c,v 1.16 1997/03/02 09:46:47 tholo Exp $ */ +/* $OpenBSD: options.c,v 1.17 1997/03/26 01:14:13 millert Exp $ */ /* $NetBSD: options.c,v 1.6 1996/03/26 23:54:18 mrg Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: options.c,v 1.16 1997/03/02 09:46:47 tholo Exp $"; +static char rcsid[] = "$OpenBSD: options.c,v 1.17 1997/03/26 01:14:13 millert Exp $"; #endif #endif /* not lint */ @@ -609,12 +609,13 @@ tar_options(argc, argv) switch(c) { case 'b': /* - * specify blocksize + * specify blocksize in 512-byte blocks */ if ((wrblksz = (int)str_offt(optarg)) <= 0) { paxwarn(1, "Invalid block size %s", optarg); tar_usage(); } + wrblksz *= 512; /* XXX - check for int oflow */ break; case 'c': /* diff --git a/bin/pax/tar.1 b/bin/pax/tar.1 index ef213e4a091..e33dcc89a88 100644 --- a/bin/pax/tar.1 +++ b/bin/pax/tar.1 @@ -27,7 +27,7 @@ .\" (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.4 1996/12/09 12:02:17 deraadt Exp $ +.\" $OpenBSD: tar.1,v 1.5 1997/03/26 01:14:14 millert Exp $ .\" .Dd June 11, 1996 .Dt TAR 1 @@ -83,9 +83,11 @@ extration. In addition to the flags mentioned above, any of the following flags may be used: .Bl -tag -width Ar -.It Fl b Ar blocksize -Set block size to use for archive. Any multiple of 512 between -10240 and 32256 may be used. +.It Fl b Ar "blocking factor" +Set blocking factor to use for archive, +.Nm tar +uses 512 byte blocks. The blocking factor may not be larger +than 63 (32256 bytes). .It Fl e Stop after first error. .It Fl f Ar archive -- 2.20.1