summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/compare.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mtree/compare.c')
-rw-r--r--usr.sbin/mtree/compare.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c
index d48db41..9f2db9f 100644
--- a/usr.sbin/mtree/compare.c
+++ b/usr.sbin/mtree/compare.c
@@ -216,6 +216,28 @@ typeerr: LABEL;
tab = "\t";
}
}
+ /*
+ * XXX
+ * since chflags(2) will reset file times, the utimes() above
+ * may have been useless! oh well, we'd rather have correct
+ * flags, rather than times?
+ */
+ if ((s->flags & F_FLAGS) && s->st_flags != p->fts_statp->st_flags) {
+ LABEL;
+ (void)printf("%sflags (\"%s\" is not ", tab,
+ flags_to_string(s->st_flags, "none"));
+ (void)printf("\"%s\"",
+ flags_to_string(p->fts_statp->st_flags, "none"));
+ if (uflag)
+ if (chflags(p->fts_accpath, s->st_flags))
+ (void)printf(", not modified: %s)\n",
+ strerror(errno));
+ else
+ (void)printf(", modified)\n");
+ else
+ (void)printf(")\n");
+ tab = "\t";
+ }
#ifdef MD5
if (s->flags & F_MD5) {
char *new_digest, buf[33];
OpenPOWER on IntegriCloud