From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 28 22:55:55 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE32E16A4CE; Sun, 28 Nov 2004 22:55:55 +0000 (GMT) Received: from mail24.syd.optusnet.com.au (mail24.syd.optusnet.com.au [211.29.133.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F83443D60; Sun, 28 Nov 2004 22:55:55 +0000 (GMT) (envelope-from syncman@optusnet.com.au) Received: from [192.168.0.7] (c211-30-64-111.belrs1.nsw.optusnet.com.au [211.30.64.111]) (authenticated bits=0)iASMtnaw012105; Mon, 29 Nov 2004 09:55:53 +1100 Message-ID: <41AAF26E.8090101@optusnet.com.au> Date: Mon, 29 Nov 2004 09:57:02 +0000 From: Andrew Sinclair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: kientzle@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 29 Nov 2004 13:31:13 +0000 cc: freebsd-hackers@freebsd.org cc: Kris Kennaway Subject: bsdtar needs --ignore-zero & --ignore-failed-read X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 22:55:56 -0000 This follows on from my post to questions@freebsd.org: Date: 16th Nov 2004 21:35 Subject: Re: 5.3-RC2 tar breaks operation with "(null)" I've upgraded to 5.3-RC2 in November and have noticed that bsdtar is now the standard Tape Archiver. While I do appreciate the simplicity of the new interface, it does lack a couple of essential options; in particular, those dealing with failed media. I found this out when attempting to extract an archive from a CD-RW. It had a few bad blocks so the drive just returned blocks of zero where these occured. This was enough to stop the extract operation dead in its tracks. I copied this to disc with dd and ran the extract operation again but it could not read past the corrupt portion. I was able to work around it with gtar and the --ignore-zero and --ignore-failed-read options but I could not find an equivalent solution for bsdtar. My suggestion is to include these options in libarchive and to assert --ignore-zero in bsdtar by default on plain files (i.e. those not on sequential media, not on a character special device file but on a random access file system). In the case of a plain file extracted with tar, the complete contents should be read. I'm not aware of any case where people typically append anything other than TAR dumps to an archive. For other programs (pkg_add), it may be best to leave this turned off. Regards, Andrew Sinclair.