Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/pax Fix a glitch with handling files larger than 2GB.



details:   https://anonhg.NetBSD.org/src/rev/519e9ec82f45
branches:  trunk
changeset: 480775:519e9ec82f45
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Wed Jan 19 18:41:23 2000 +0000

description:
Fix a glitch with handling files larger than 2GB.

diffstat:

 bin/pax/tar.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 233c7bd546de -r 519e9ec82f45 bin/pax/tar.c
--- a/bin/pax/tar.c     Wed Jan 19 18:31:10 2000 +0000
+++ b/bin/pax/tar.c     Wed Jan 19 18:41:23 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tar.c,v 1.16 1999/10/22 10:43:12 mrg Exp $     */
+/*     $NetBSD: tar.c,v 1.17 2000/01/19 18:41:23 mycroft Exp $ */
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)tar.c      8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: tar.c,v 1.16 1999/10/22 10:43:12 mrg Exp $");
+__RCSID("$NetBSD: tar.c,v 1.17 2000/01/19 18:41:23 mycroft Exp $");
 #endif
 #endif /* not lint */
 
@@ -481,7 +481,11 @@
            0xfff);
        arcn->sb.st_uid = (uid_t)asc_ul(hd->uid, sizeof(hd->uid), OCT);
        arcn->sb.st_gid = (gid_t)asc_ul(hd->gid, sizeof(hd->gid), OCT);
-       arcn->sb.st_size = (size_t)asc_ul(hd->size, sizeof(hd->size), OCT);
+#      ifdef NET2_STAT
+       arcn->sb.st_size = (off_t)asc_ul(hd->size, sizeof(hd->size), OCT);
+#      else
+       arcn->sb.st_size = (off_t)asc_uqd(hd->size, sizeof(hd->size), OCT);
+#      endif
        arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT);
        arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
 
@@ -882,7 +886,11 @@
         */
        arcn->sb.st_mode = (mode_t)(asc_ul(hd->mode, sizeof(hd->mode), OCT) &
            0xfff);
-       arcn->sb.st_size = (size_t)asc_ul(hd->size, sizeof(hd->size), OCT);
+#      ifdef NET2_STAT
+       arcn->sb.st_size = (off_t)asc_ul(hd->size, sizeof(hd->size), OCT);
+#      else
+       arcn->sb.st_size = (off_t)asc_uqd(hd->size, sizeof(hd->size), OCT);
+#      endif
        arcn->sb.st_mtime = (time_t)asc_ul(hd->mtime, sizeof(hd->mtime), OCT);
        arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
 



Home | Main Index | Thread Index | Old Index