Deleted Added
full compact
compare.c (144295) compare.c (205793)
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

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

28 */
29
30#if 0
31#ifndef lint
32static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
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

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

28 */
29
30#if 0
31#ifndef lint
32static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
33#endif /* not lint */
34#endif
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/usr.sbin/mtree/compare.c 144295 2005-03-29 11:44:17Z tobez $");
36__FBSDID("$FreeBSD: head/usr.sbin/mtree/compare.c 205793 2010-03-28 13:16:08Z ed $");
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#include <sys/time.h>
41
42#include <err.h>
43#include <errno.h>
44#include <fcntl.h>

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

176 (intmax_t)s->st_size, (intmax_t)p->fts_statp->st_size);
177 tab = "\t";
178 }
179 /*
180 * XXX
181 * Catches nano-second differences, but doesn't display them.
182 */
183 if ((s->flags & F_TIME) &&
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#include <sys/time.h>
41
42#include <err.h>
43#include <errno.h>
44#include <fcntl.h>

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

176 (intmax_t)s->st_size, (intmax_t)p->fts_statp->st_size);
177 tab = "\t";
178 }
179 /*
180 * XXX
181 * Catches nano-second differences, but doesn't display them.
182 */
183 if ((s->flags & F_TIME) &&
184 ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtimespec.tv_sec) ||
185 (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtimespec.tv_nsec))) {
184 ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtim.tv_sec) ||
185 (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtim.tv_nsec))) {
186 LABEL;
187 (void)printf("%smodification time expected %.24s ",
188 tab, ctime(&s->st_mtimespec.tv_sec));
189 (void)printf("found %.24s",
186 LABEL;
187 (void)printf("%smodification time expected %.24s ",
188 tab, ctime(&s->st_mtimespec.tv_sec));
189 (void)printf("found %.24s",
190 ctime(&p->fts_statp->st_mtimespec.tv_sec));
190 ctime(&p->fts_statp->st_mtim.tv_sec));
191 if (uflag) {
192 tv[0].tv_sec = s->st_mtimespec.tv_sec;
193 tv[0].tv_usec = s->st_mtimespec.tv_nsec / 1000;
194 tv[1] = tv[0];
195 if (utimes(p->fts_accpath, tv))
196 (void)printf(" not modified: %s\n",
197 strerror(errno));
198 else

--- 190 unchanged lines hidden ---
191 if (uflag) {
192 tv[0].tv_sec = s->st_mtimespec.tv_sec;
193 tv[0].tv_usec = s->st_mtimespec.tv_nsec / 1000;
194 tv[1] = tv[0];
195 if (utimes(p->fts_accpath, tv))
196 (void)printf(" not modified: %s\n",
197 strerror(errno));
198 else

--- 190 unchanged lines hidden ---