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 src:
details: https://anonhg.NetBSD.org/pkgsrc/rev/4484178932e8
branches: trunk
changeset: 477448:4484178932e8
user: grant <grant%pkgsrc.org@localhost>
date: Sat Jul 03 02:50:21 2004 +0000
description:
sync with src:
Salvage the `create parent directories and try again' path which is
removed by the previous commit.
diffstat:
archivers/pax/files/file_subs.c | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diffs (83 lines):
diff -r c30e13317ef6 -r 4484178932e8 archivers/pax/files/file_subs.c
--- a/archivers/pax/files/file_subs.c Sat Jul 03 02:08:02 2004 +0000
+++ b/archivers/pax/files/file_subs.c Sat Jul 03 02:50:21 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: file_subs.c,v 1.7 2004/06/26 13:30:59 grant Exp $ */
+/* $NetBSD: file_subs.c,v 1.8 2004/07/03 02:50:21 grant Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "@(#)file_subs.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: file_subs.c,v 1.7 2004/06/26 13:30:59 grant Exp $");
+__RCSID("$NetBSD: file_subs.c,v 1.8 2004/07/03 02:50:21 grant Exp $");
#endif
#endif /* not lint */
@@ -433,7 +433,7 @@
file_mode = arcn->sb.st_mode & FILEBITS(arcn->type == PAX_DIR);
for (;;) {
- switch(arcn->type) {
+ switch (arcn->type) {
case PAX_DIR:
/*
* If -h (or -L) was given in tar-mode, follow the
@@ -447,7 +447,8 @@
sizeof target - 1);
if (len == -1) {
syswarn(0, errno,
- "cannot follow symlink %s in chain for %s",
+ "cannot follow symlink %s "
+ "in chain for %s",
nm, arcn->name);
res = -1;
goto badlink;
@@ -480,7 +481,7 @@
tty_warn(0,
"%s skipped. Sockets cannot be copied or extracted",
nm);
- return(-1);
+ return (-1);
case PAX_SLK:
res = symlink(arcn->ln_name, nm);
break;
@@ -494,7 +495,7 @@
*/
tty_warn(0, "%s has an unknown file type, skipping",
nm);
- return(-1);
+ return (-1);
}
/*
@@ -509,15 +510,20 @@
* we failed to make the node
*/
oerrno = errno;
- if ((ign = unlnk_exist(nm, arcn->type)) < 0)
- return(-1);
-
- if (++pass <= 1)
+ switch (pass++) {
+ case 0:
+ if ((ign = unlnk_exist(nm, arcn->type)) < 0)
+ return (-1);
continue;
- if (nodirs || chk_path(nm,arcn->sb.st_uid,arcn->sb.st_gid) < 0) {
- syswarn(1, oerrno, "Cannot create %s", nm);
- return(-1);
+ case 1:
+ if (nodirs ||
+ chk_path(nm, arcn->sb.st_uid,
+ arcn->sb.st_gid) < 0) {
+ syswarn(1, oerrno, "Cannot create %s", nm);
+ return (-1);
+ }
+ continue;
}
/*
Home |
Main Index |
Thread Index |
Old Index