diff options
author | Tim Kientzle <kientzle@FreeBSD.org> | 2005-05-08 06:25:15 +0000 |
---|---|---|
committer | Tim Kientzle <kientzle@FreeBSD.org> | 2005-05-08 06:25:15 +0000 |
commit | cf220b45a53aeb639b45b1bbad792b1fb4d27dab (patch) | |
tree | dd295cc8a145953b2da6a8825022612bc45c76a4 | |
parent | 15e343060c6bc00334ec8d96f01cef1482b5dd81 (diff) |
Notes
-rw-r--r-- | usr.bin/tar/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/tar/tree.c | 4 | ||||
-rw-r--r-- | usr.bin/tar/tree.h | 2 | ||||
-rw-r--r-- | usr.bin/tar/write.c | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tar/Makefile b/usr.bin/tar/Makefile index 578c044e5c81c..128f2c2c8a719 100644 --- a/usr.bin/tar/Makefile +++ b/usr.bin/tar/Makefile @@ -6,7 +6,7 @@ # PROG= bsdtar -VERSION= 1.02.022 +VERSION= 1.02.023 DIST_SRCS= bsdtar.c getdate.y matching.c read.c tree.c util.c write.c SRCS= ${DIST_SRCS} WARNS?= 5 diff --git a/usr.bin/tar/tree.c b/usr.bin/tar/tree.c index 0fc3584523986..4528eea3c15b3 100644 --- a/usr.bin/tar/tree.c +++ b/usr.bin/tar/tree.c @@ -309,13 +309,13 @@ tree_next(struct tree *t) /* chdir() failed; return error */ tree_pop(t); t->tree_errno = errno; - return (t->visit_type = TREE_ERROR); + return (t->visit_type = TREE_ERROR_DIR); } t->d = opendir("."); if (t->d == NULL) { tree_pop(t); t->tree_errno = errno; - return (t->visit_type = TREE_ERROR); + return (t->visit_type = TREE_ERROR_DIR); } t->depth++; t->flags &= ~hasLstat; diff --git a/usr.bin/tar/tree.h b/usr.bin/tar/tree.h index 95dad6b78c524..06eab8ea08f18 100644 --- a/usr.bin/tar/tree.h +++ b/usr.bin/tar/tree.h @@ -68,7 +68,7 @@ void tree_close(struct tree *); #define TREE_REGULAR 1 #define TREE_POSTDESCENT 2 #define TREE_POSTASCENT 3 -#define TREE_ERROR -1 +#define TREE_ERROR_DIR -1 int tree_next(struct tree *); int tree_errno(struct tree *); diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 3d833e93f8d36..39743276e9c7b 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -537,14 +537,14 @@ write_hierarchy(struct bsdtar *bsdtar, struct archive *a, const char *path) const struct stat *st = NULL, *lst = NULL; int descend; - if (tree_ret == TREE_ERROR) - bsdtar_warnc(bsdtar, errno, "%s", name); + if (tree_ret == TREE_ERROR_DIR) + bsdtar_warnc(bsdtar, errno, "%s: Couldn't visit directory", name); if (tree_ret != TREE_REGULAR) continue; lst = tree_current_lstat(tree); if (lst == NULL) { /* Couldn't lstat(); must not exist. */ - bsdtar_warnc(bsdtar, errno, "%s: Cannot open", path); + bsdtar_warnc(bsdtar, errno, "%s: Cannot stat", path); bsdtar->return_value = 1; continue; } @@ -744,7 +744,7 @@ write_entry(struct bsdtar *bsdtar, struct archive *a, const struct stat *st, fd = open(accpath, O_RDONLY); if (fd < 0) { if (!bsdtar->verbose) - bsdtar_warnc(bsdtar, errno, "%s", pathname); + bsdtar_warnc(bsdtar, errno, "%s: could not open file", pathname); else fprintf(stderr, ": %s", strerror(errno)); goto cleanup; |