diff options
author | kientzle <kientzle@FreeBSD.org> | 2004-06-07 07:19:04 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2004-06-07 07:19:04 +0000 |
commit | 6404643ce98574b9dc121c6d897c3d306bb5a3b2 (patch) | |
tree | 9c4898b6f99c4e4514a606dccd7aa6e796101857 | |
parent | 5707dd1fa57f288b64c281391afd809c567d1c2e (diff) | |
download | FreeBSD-src-6404643ce98574b9dc121c6d897c3d306bb5a3b2.zip FreeBSD-src-6404643ce98574b9dc121c6d897c3d306bb5a3b2.tar.gz |
Set program exit value to 1 if there are any of various errors when
creating an archive.
Pointed out by: Failure to complain when building certain broken packages
(Thanks again to Kris Kennaway for finding this!)
-rw-r--r-- | usr.bin/tar/write.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.bin/tar/write.c b/usr.bin/tar/write.c index 936b50c..edf3909 100644 --- a/usr.bin/tar/write.c +++ b/usr.bin/tar/write.c @@ -565,6 +565,7 @@ write_heirarchy(struct bsdtar *bsdtar, struct archive *a, const char *path) if (!fts) { bsdtar_warnc(bsdtar, errno, "%s: Cannot open", path); + bsdtar->return_value = 1; return; } @@ -573,15 +574,18 @@ write_heirarchy(struct bsdtar *bsdtar, struct archive *a, const char *path) case FTS_NS: bsdtar_warnc(bsdtar, ftsent->fts_errno, "%s: Could not stat", ftsent->fts_path); + bsdtar->return_value = 1; break; case FTS_ERR: bsdtar_warnc(bsdtar, ftsent->fts_errno, "%s", ftsent->fts_path); + bsdtar->return_value = 1; break; case FTS_DNR: bsdtar_warnc(bsdtar, ftsent->fts_errno, "%s: Cannot read directory contents", ftsent->fts_path); + bsdtar->return_value = 1; break; case FTS_W: /* Skip Whiteout entries */ break; |