From owner-freebsd-current Mon Nov 6 20:21:33 2000 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id D2A3337B4C5; Mon, 6 Nov 2000 20:21:28 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id PAA32690; Tue, 7 Nov 2000 15:21:09 +1100 Date: Tue, 7 Nov 2000 15:21:35 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Jeroen Ruigrok van der Werven Cc: "John W. De Boskey" , Current List Subject: Re: tar : needs some attention? In-Reply-To: <20001106180013.W43259@lucifer.bart.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 6 Nov 2000, Jeroen Ruigrok van der Werven wrote: > -On [20001106 17:10], John W. De Boskey (jwd@FreeBSD.ORG) wrote: > >tar: cdrom/disc2/dev/acd0t39: minor number too large; not dumped > > > > Is this the expected behaviour, or is it worth digging into > >tar and making some fixes? > > I am hoping to update tar soon these weeks. Don't forget to merge all the FreeBSD changes including the ones that print this message. For the file: crw-rw---- 1 root operator 9, 0x08010002 Feb 12 1995 fd0.1200 gnu tar (v.1.13) prints the user-unfriendly message: tar: minor_t value 134283266 too large (max=16777215) while FreeBSD tar prints: tar: fd0.1200: minor number too large; not dumped It is not easy to see that 134283266 is 0x08010002 or that the file is fd0.1200 (the limit 16777215 is 0xFFFFFF -- 24 bits). gnu tar 1.13 actually dumps acd0t39, and FreeBSD tar reads back the result correctly. This is because gnu tar 1.13 permits 24-bit minor numbers, while the FreeBSD version only permits 21-bit ones since it requires a byte of null padding in the minor number field. I seem to have misread the gnu tar 1.13 sources in the following commit: RCS file: /home/ncvs/src/gnu/usr.bin/tar/create.c,v Working file: create.c head: 1.7 ... ---------------------------- revision 1.7 date: 1999/08/11 08:03:39; author: bde; state: Exp; lines: +15 -2 Support 21-bit minor numbers. Avoid wasting a byte in their octal representation by generating the same format as tar-1.13 (use a single space as the terminator for 7-digit octal numbers). This is POSIX.1 conformant (2-byte terminators are just a bug or historical wart in old versions of gnu tar). All devices created by `MAKEDEV all' except rsa0.ctl can now be handled by tar(1). ---------------------------- Previous versions of FreeBSD wasted 2 bytes for null padding. The current version still wastes (?) 1 byte relative to gnu tar 1.13. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message