Hi Pavel,
Michael, a Debian GNU/Linux user, reported this bug and suggested the
following patch for the same.
I soon would like to infor you and the `mc-devel` list about this.
Thank you in advance
Cheers
SteX
- Forwarded message from Michael Mueller [EMAIL PROTECTED] -
Date: Tue, 23 Aug 2005 21:50:35 +0200
From: Michael Mueller [EMAIL PROTECTED]
To: Stefano Melchior [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Bug#324755: mc: tar archives greater than 2GB not supported
Reply-To: Michael Mueller [EMAIL PROTECTED], [EMAIL PROTECTED]
Resent-From: Michael Mueller [EMAIL PROTECTED]
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: Stefano Melchior [EMAIL PROTECTED]
Resent-Date: Tue, 23 Aug 2005 20:03:10 UTC
Resent-Message-ID: [EMAIL PROTECTED]
X-Debian-PR-Message: report 324755
X-Debian-PR-Package: mc
X-Debian-PR-Keywords:
X-ID: TEOJF2ZOreDY-47VoI3b39kQg+akK-GT4Fbt0Cbg0aubvSIGkeH3rO
X-TOI-MSGID: dc04d4ea-64e3-4bab-bace-072c7e66b82e
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level:
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2005_01_02
Resent-Sender: Debian BTS [EMAIL PROTECTED]
Package: mc
Version: 4.6.0-4.6.1-pre4-2
Midnight Commander does handle tar archives bigger than the magic 2GB
size incorrectly.
I appended a patch fixing the problem. Since it includes changes in the
VFS of the Midnight Commander, changes made to other virtual filesystems
are included too. Those however are not tested and mostly will not make
them bypassing the limit.
With best regards
Michael M?ller
diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/cpio.c
mc-4.6.1-pre4/vfs/cpio.c
--- mc-4.6.1-pre4.debian/vfs/cpio.c 2005-05-27 16:19:19.0 +0200
+++ mc-4.6.1-pre4/vfs/cpio.c2005-08-23 21:32:39.306219927 +0200
@@ -83,7 +83,7 @@
struct vfs_s_inode *inode;
};
-static int cpio_position;
+static off_t cpio_position;
static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super);
static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super);
@@ -107,7 +107,7 @@
return l;
}
-static int cpio_skip_padding(struct vfs_s_super *super)
+static off_t cpio_skip_padding(struct vfs_s_super *super)
{
switch(super-u.arch.type) {
case CPIO_BIN:
diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/direntry.c
mc-4.6.1-pre4/vfs/direntry.c
--- mc-4.6.1-pre4.debian/vfs/direntry.c 2004-11-29 19:44:49.0 +0100
+++ mc-4.6.1-pre4/vfs/direntry.c2005-08-23 21:32:39.307219773 +0200
@@ -836,13 +836,13 @@
return 0;
}
-static int
+static off_t
vfs_s_lseek (void *fh, off_t offset, int whence)
{
off_t size = FH-ino-st.st_size;
if (FH-handle != -1){ /* If we have local file opened, we want to
work with it */
- int retval = lseek (FH-handle, offset, whence);
+ off_t retval = lseek (FH-handle, offset, whence);
if (retval == -1)
FH-ino-super-me-verrno = errno;
return retval;
diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/extfs.c
mc-4.6.1-pre4/vfs/extfs.c
--- mc-4.6.1-pre4.debian/vfs/extfs.c2005-05-27 16:19:19.0 +0200
+++ mc-4.6.1-pre4/vfs/extfs.c 2005-08-23 21:32:39.309219464 +0200
@@ -1125,7 +1125,7 @@
return 0;
}
-static int extfs_lseek (void *data, off_t offset, int whence)
+static off_t extfs_lseek (void *data, off_t offset, int whence)
{
struct pseudofile *file = (struct pseudofile *) data;
diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/local.c
mc-4.6.1-pre4/vfs/local.c
--- mc-4.6.1-pre4.debian/vfs/local.c2004-09-25 01:00:18.0 +0200
+++ mc-4.6.1-pre4/vfs/local.c 2005-08-23 21:32:39.310219310 +0200
@@ -197,7 +197,7 @@
return chdir (path);
}
-int
+off_t
local_lseek (void *data, off_t offset, int whence)
{
int fd = * (int *) data;
diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/local.h
mc-4.6.1-pre4/vfs/local.h
--- mc-4.6.1-pre4.debian/vfs/local.h2004-08-17 11:17:43.0 +0200
+++ mc-4.6.1-pre4/vfs/local.h 2005-08-23 21:32:39.318218076 +0200
@@ -11,7 +11,7 @@
extern int local_read (void *data, char *buffer, int count);
extern int local_fstat (void *data, struct stat *buf);
extern int local_errno (struct vfs_class *me);
-extern int local_lseek (void *data, off_t offset, int whence);
+extern off_t local_lseek (void *data, off_t offset, int whence);
#ifdef HAVE_MMAP
extern caddr_t local_mmap (struct vfs_class *me, caddr_t addr, size_t len,
int prot, int flags, void *data, off_t offset);
diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/mcfs.c
mc-4.6.1-pre4/vfs/mcfs.c
--- mc-4.6.1-pre4.debian/vfs/mcfs.c 2005-05-27 16:19:19.0 +0200
+++ mc-4.6.1-pre4/vfs/mcfs.c2005-08-23 21:32:39.315218539 +0200
@@ -1037,7 +1037,7 @@
return 0;
}
-static int
+static off_t
mcfs_lseek (void *data, off_t