Deleted Added
full compact
compare.c (51705) compare.c (54375)
1/*-
2 * Copyright (c) 1989, 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[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
37#endif
38static const char rcsid[] =
1/*-
2 * Copyright (c) 1989, 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[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
37#endif
38static const char rcsid[] =
39 "$FreeBSD: head/usr.sbin/mtree/compare.c 51705 1999-09-27 00:36:03Z billf $";
39 "$FreeBSD: head/usr.sbin/mtree/compare.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 <err.h>
45#include <errno.h>
46#include <fcntl.h>
47#include <fts.h>

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

211 if (s->cksum != val) {
212 LABEL;
213 (void)printf("%scksum (%lu, %lu)\n",
214 tab, s->cksum, val);
215 }
216 tab = "\t";
217 }
218 }
40#endif /* not lint */
41
42#include <sys/param.h>
43#include <sys/stat.h>
44#include <err.h>
45#include <errno.h>
46#include <fcntl.h>
47#include <fts.h>

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

211 if (s->cksum != val) {
212 LABEL;
213 (void)printf("%scksum (%lu, %lu)\n",
214 tab, s->cksum, val);
215 }
216 tab = "\t";
217 }
218 }
219 /*
220 * XXX
221 * since chflags(2) will reset file times, the utimes() above
222 * may have been useless! oh well, we'd rather have correct
223 * flags, rather than times?
224 */
225 if ((s->flags & F_FLAGS) && s->st_flags != p->fts_statp->st_flags) {
226 LABEL;
227 (void)printf("%sflags (\"%s\" is not ", tab,
228 flags_to_string(s->st_flags, "none"));
229 (void)printf("\"%s\"",
230 flags_to_string(p->fts_statp->st_flags, "none"));
231 if (uflag)
232 if (chflags(p->fts_accpath, s->st_flags))
233 (void)printf(", not modified: %s)\n",
234 strerror(errno));
235 else
236 (void)printf(", modified)\n");
237 else
238 (void)printf(")\n");
239 tab = "\t";
240 }
219#ifdef MD5
220 if (s->flags & F_MD5) {
221 char *new_digest, buf[33];
222
223 new_digest = MD5File(p->fts_accpath, buf);
224 if (!new_digest) {
225 LABEL;
226 printf("%sMD5File: %s: %s\n", tab, p->fts_accpath,

--- 116 unchanged lines hidden ---
241#ifdef MD5
242 if (s->flags & F_MD5) {
243 char *new_digest, buf[33];
244
245 new_digest = MD5File(p->fts_accpath, buf);
246 if (!new_digest) {
247 LABEL;
248 printf("%sMD5File: %s: %s\n", tab, p->fts_accpath,

--- 116 unchanged lines hidden ---