Deleted Added
full compact
compare.c (121299) compare.c (121300)
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
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
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
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
13 * 3. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

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

32 */
33
34#if 0
35#ifndef lint
36static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93";
37#endif /* not lint */
38#endif
39#include <sys/cdefs.h>
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

--- 6 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>
40__FBSDID("$FreeBSD: head/usr.sbin/mtree/compare.c 121299 2003-10-21 07:58:52Z phk $");
36__FBSDID("$FreeBSD: head/usr.sbin/mtree/compare.c 121300 2003-10-21 08:27:05Z phk $");
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>
48#ifdef MD5

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

264 new_digest = SHA1_File(p->fts_accpath, buf);
265 if (!new_digest) {
266 LABEL;
267 printf("%sSHA-1: %s: %s\n", tab, p->fts_accpath,
268 strerror(errno));
269 tab = "\t";
270 } else if (strcmp(new_digest, s->sha1digest)) {
271 LABEL;
37
38#include <sys/param.h>
39#include <sys/stat.h>
40#include <err.h>
41#include <errno.h>
42#include <fcntl.h>
43#include <fts.h>
44#ifdef MD5

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

260 new_digest = SHA1_File(p->fts_accpath, buf);
261 if (!new_digest) {
262 LABEL;
263 printf("%sSHA-1: %s: %s\n", tab, p->fts_accpath,
264 strerror(errno));
265 tab = "\t";
266 } else if (strcmp(new_digest, s->sha1digest)) {
267 LABEL;
272 printf("%sSHA-1 expected %s found %s\n",
268 printf("%sSHA-1 expected %s found %s\n",
273 tab, s->sha1digest, new_digest);
274 tab = "\t";
275 }
276 }
277#endif /* SHA1 */
278#ifdef RMD160
279 if (s->flags & F_RMD160) {
280 char *new_digest, buf[41];

--- 84 unchanged lines hidden ---
269 tab, s->sha1digest, new_digest);
270 tab = "\t";
271 }
272 }
273#endif /* SHA1 */
274#ifdef RMD160
275 if (s->flags & F_RMD160) {
276 char *new_digest, buf[41];

--- 84 unchanged lines hidden ---