Deleted Added
full compact
verify.c (51705) verify.c (54375)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
37#endif
38static const char rcsid[] =
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 22 unchanged lines hidden (view full) ---

31 * SUCH DAMAGE.
32 */
33
34#ifndef lint
35#if 0
36static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/usr.sbin/mtree/verify.c 51705 1999-09-27 00:36:03Z billf $";
39 "$FreeBSD: head/usr.sbin/mtree/verify.c 54375 1999-12-09 20:38:36Z joe $";
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44#include <dirent.h>
45#include <err.h>
46#include <errno.h>
47#include <fts.h>

--- 148 unchanged lines hidden (view full) ---

196 miss(p->child, tp + 1);
197 *tp = '\0';
198
199 if (!create)
200 continue;
201 if (chown(path, p->st_uid, p->st_gid)) {
202 (void)printf("%s: user/group/mode not modified: %s\n",
203 path, strerror(errno));
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44#include <dirent.h>
45#include <err.h>
46#include <errno.h>
47#include <fts.h>

--- 148 unchanged lines hidden (view full) ---

196 miss(p->child, tp + 1);
197 *tp = '\0';
198
199 if (!create)
200 continue;
201 if (chown(path, p->st_uid, p->st_gid)) {
202 (void)printf("%s: user/group/mode not modified: %s\n",
203 path, strerror(errno));
204 (void)printf("%s: warning: file mode %snot set\n", path,
205 (p->flags & F_FLAGS) ? "and file flags " : "");
204 continue;
205 }
206 if (chmod(path, p->st_mode))
207 (void)printf("%s: permissions not set: %s\n",
208 path, strerror(errno));
206 continue;
207 }
208 if (chmod(path, p->st_mode))
209 (void)printf("%s: permissions not set: %s\n",
210 path, strerror(errno));
211 if ((p->flags & F_FLAGS) && p->st_flags &&
212 chflags(path, p->st_flags))
213 (void)printf("%s: file flags not set: %s\n",
214 path, strerror(errno));
209 }
210}
215 }
216}