diff options
author | kientzle <kientzle@FreeBSD.org> | 2005-05-08 06:25:15 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2005-05-08 06:25:15 +0000 |
commit | 5fd4825f3c0631eb60d4b42821d10b9777d7fbed (patch) | |
tree | dd295cc8a145953b2da6a8825022612bc45c76a4 | |
parent | 6002c77e8f98c827c409cd1032d63a6896fd469a (diff) | |
download | FreeBSD-src-5fd4825f3c0631eb60d4b42821d10b9777d7fbed.zip FreeBSD-src-5fd4825f3c0631eb60d4b42821d10b9777d7fbed.tar.gz |
Clarify some error messages.
-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 578c044..128f2c2 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 0fc3584..4528eea 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 95dad6b..06eab8e 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 3d833e9..3974327 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; |