pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/archivers/pax/files sync with -current:
details: https://anonhg.NetBSD.org/pkgsrc/rev/f27608dcffa0
branches: trunk
changeset: 465055:f27608dcffa0
user: grant <grant%pkgsrc.org@localhost>
date: Sat Dec 20 04:46:27 2003 +0000
description:
sync with -current:
Don't emit any warnings when tar is trying to figure out if the file is
really tar format. valid CPIO files should not trigger a warning from tar.c
diffstat:
archivers/pax/files/tar.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diffs (66 lines):
diff -r c8982fd766d2 -r f27608dcffa0 archivers/pax/files/tar.c
--- a/archivers/pax/files/tar.c Sat Dec 20 04:45:04 2003 +0000
+++ b/archivers/pax/files/tar.c Sat Dec 20 04:46:27 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tar.c,v 1.6 2003/12/20 04:45:04 grant Exp $ */
+/* $NetBSD: tar.c,v 1.7 2003/12/20 04:46:27 grant Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: tar.c,v 1.6 2003/12/20 04:45:04 grant Exp $");
+__RCSID("$NetBSD: tar.c,v 1.7 2003/12/20 04:46:27 grant Exp $");
#endif
#endif /* not lint */
@@ -103,7 +103,7 @@
static int ull_oct(unsigned long long, char *, int, int);
#endif
static int tar_gnutar_exclude_one(const char *, size_t);
-static int check_sum(char *, size_t, char *, size_t);
+static int check_sum(char *, size_t, char *, size_t, int);
/*
* Routines common to all versions of tar
@@ -121,7 +121,7 @@
char *gnu_link_string; /* ././@LongLink hackery link */
static int
-check_sum(char *hd, size_t hdlen, char *bl, size_t bllen)
+check_sum(char *hd, size_t hdlen, char *bl, size_t bllen, int quiet)
{
u_long hdck, blck;
@@ -129,8 +129,9 @@
blck = tar_chksm(bl, bllen);
if (hdck != blck) {
- tty_warn(0, "Header checksum %lo does not match %lo",
- hdck, blck);
+ if (!quiet)
+ tty_warn(0, "Header checksum %lo does not match %lo",
+ hdck, blck);
return(-1);
}
return(0);
@@ -398,7 +399,7 @@
return(-1);
if (strncmp(uhd->magic, TMAGIC, TMAGLEN - 1) == 0)
return(-1);
- return check_sum(hd->chksum, sizeof(hd->chksum), blk, BLKMULT);
+ return check_sum(hd->chksum, sizeof(hd->chksum), blk, BLKMULT, 1);
}
/*
@@ -788,7 +789,7 @@
tty_warn(0,
"Trying to read GNU tar archive with extensions off");
}
- return check_sum(hd->chksum, sizeof(hd->chksum), blk, BLKMULT);
+ return check_sum(hd->chksum, sizeof(hd->chksum), blk, BLKMULT, 0);
}
/*
Home |
Main Index |
Thread Index |
Old Index