aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/tar/matching.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2008-05-26 17:10:10 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2008-05-26 17:10:10 +0000
commiteb36031906b623c41398f29df9178b5214a4c9fa (patch)
treed94d00fec531d1439aa528d7d109ac2166ab5295 /usr.bin/tar/matching.c
parentfa07de5eeb36516701b3393f13acc1e1f702c634 (diff)
downloadsrc-eb36031906b623c41398f29df9178b5214a4c9fa.tar.gz
src-eb36031906b623c41398f29df9178b5214a4c9fa.zip
MFp4: bsdtar 2.5.4b
In addition to a number of bug fixes and minor changes: * --numeric-owner (ignore user/group names on create and extract) * -S (sparsify files on extraction) * -s (regex filename substitutions) * Use new libarchive 'linkify' to get correct hardlink handling for both old and new cpio formats * Rework 'copy' test to be insensitive to readdir() filename ordering Most of the credit for this work goes to Joerg Sonnenberger, who has been duplicating features from NetBSD's 'pax' program.
Notes
Notes: svn path=/head/; revision=179322
Diffstat (limited to 'usr.bin/tar/matching.c')
-rw-r--r--usr.bin/tar/matching.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/usr.bin/tar/matching.c b/usr.bin/tar/matching.c
index d0e60f254ae7..782f76104167 100644
--- a/usr.bin/tar/matching.c
+++ b/usr.bin/tar/matching.c
@@ -259,6 +259,29 @@ unmatched_inclusions(struct bsdtar *bsdtar)
}
+int
+unmatched_inclusions_warn(struct bsdtar *bsdtar, const char *msg)
+{
+ struct matching *matching;
+ struct match *p;
+
+ matching = bsdtar->matching;
+ if (matching == NULL)
+ return (0);
+
+ p = matching->inclusions;
+ while (p != NULL) {
+ if (p->matches == 0) {
+ bsdtar->return_value = 1;
+ bsdtar_warnc(bsdtar, 0, "%s: %s",
+ p->pattern, msg);
+ }
+ p = p->next;
+ }
+ return (matching->inclusions_unmatched_count);
+}
+
+
#if defined(HAVE_FNMATCH) && defined(HAVE_FNM_LEADING_DIR)