summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/verify.c
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2003-03-13 23:35:30 +0000
committerrobert <robert@FreeBSD.org>2003-03-13 23:35:30 +0000
commitf0edd7ef8f286a7c5bbe22a375e7cd4dfc9b8c08 (patch)
treeed5993b660e2db43eaaa03d48d877efe9eeb284a /usr.sbin/mtree/verify.c
parent3b6f2203556af7e12bea67a10cce877a7a6ccb5d (diff)
downloadFreeBSD-src-f0edd7ef8f286a7c5bbe22a375e7cd4dfc9b8c08.zip
FreeBSD-src-f0edd7ef8f286a7c5bbe22a375e7cd4dfc9b8c08.tar.gz
- Align the function prototype of the external `crc' function with
how `crc' is actually defined. - Remove an unnecessary `extern' variable declaration. Data type corrections: - Define a variable which contains a file byte offset value as type off_t as required by the `crc' function. - Change the type of a variable carrying a CRC checksum from `u_long' to `uint32_t'. - Substitute the wrong `extern' variable declaration of `crc_total' by putting a correct one in the shared header extern.h. `crc_total' is defined as an `uint32_t', thus fixing incorrect mtree checksums on big-endian LP64 machines.
Diffstat (limited to 'usr.sbin/mtree/verify.c')
-rw-r--r--usr.sbin/mtree/verify.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c
index d56ee8f..49e2142 100644
--- a/usr.sbin/mtree/verify.c
+++ b/usr.sbin/mtree/verify.c
@@ -51,7 +51,6 @@ static const char rcsid[] =
#include "mtree.h"
#include "extern.h"
-extern long int crc_total;
extern int ftsoptions;
extern int dflag, eflag, qflag, rflag, sflag, uflag;
extern char fullpath[MAXPATHLEN];
@@ -155,7 +154,7 @@ extra:
}
(void)fts_close(t);
if (sflag)
- warnx("%s checksum: %lu", fullpath, crc_total);
+ warnx("%s checksum: %lu", fullpath, (unsigned long)crc_total);
return (rval);
}
OpenPOWER on IntegriCloud