Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 21:39:35 +0900
From:      Watanabe Kazuhiro <CQG00620@nifty.ne.jp>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/66876: [patch] Cannot extract tar(1) multi-volume archive on floppy drive.
Message-ID:  <200405191237.i4JCbkpT004389@mail500.nifty.com>
Resent-Message-ID: <200405191240.i4JCe8b3034229@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         66876
>Category:       i386
>Synopsis:       [patch] Cannot extract tar(1) multi-volume archive on floppy drive.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 19 05:40:08 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Watanabe Kazuhiro
>Release:        FreeBSD 5.2.1-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD pisces.zodiac.org 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #0: Tue May 18 00:19:57 JST 2004 nabe@pisces.zodiac.org:/opt/obj/usr/src/sys/VASH i386

(Floppy drive)
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0

This PC is dual-booting FreeBSD 4.7-RELEASE and 5.2.1-RELEASE.

>Description:
I can make tar(1) multi-volume archive on floppy drive.
It can be extracted with FreeBSD 4.7-RELEASE.

But the archive cannot be extracted a same PC with
FreeBSD 5.2.1-RELEASE.

>How-To-Repeat:
(Floppy media: 1.44M/2HD)
# dd if=/dev/zero bs=2m count=1 > test.data
# ls -l test.data
-rw-r--r--  1 root  wheel  2097152 May 19 11:49 test.data
# tar cfM /dev/fd0 test.data
Prepare volume #2 for `/dev/fd0' and hit return: 
(Change a medium #2, and the command finished normally)
(Change a medium #1)
# tar xfM /dev/fd0 -C /tmp
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: /dev/fd0: Cannot read: Invalid argument
tar: Too many errors, quitting
tar: Error is not recoverable: exiting now
# ls -l /tmp/test.data
-rw-r--r--  1 root  wheel  1474048 May 19 11:53 /tmp/test.data
#

>Fix:
--- /sys/isa/fd.c.orig	Thu Oct 23 14:52:52 2003
+++ /sys/isa/fd.c	Wed May 19 11:59:35 2004
@@ -1725,7 +1725,7 @@
 	/*
 	 * Set up block calculations.
 	 */
-	if (bp->bio_offset >= ((off_t)128 << fd->ft->secsize) * fd->ft->size) {
+	if (bp->bio_offset > ((off_t)128 << fd->ft->secsize) * fd->ft->size) {
 		bp->bio_error = EINVAL;
 		bp->bio_flags |= BIO_ERROR;
 		goto bad;
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405191237.i4JCbkpT004389>