From 1388e93ab651027fa0f0da1327bc3a7ef659fb42 Mon Sep 17 00:00:00 2001 From: niklas Date: Sun, 8 Dec 1996 01:13:38 +0000 Subject: [PATCH] 64-bit clean + RCS tags --- usr.sbin/mtree/Makefile | 2 +- usr.sbin/mtree/compare.c | 6 +++--- usr.sbin/mtree/create.c | 11 ++++++----- usr.sbin/mtree/extern.h | 3 ++- usr.sbin/mtree/misc.c | 1 + usr.sbin/mtree/mtree.8 | 1 + usr.sbin/mtree/mtree.c | 5 +++-- usr.sbin/mtree/mtree.h | 3 ++- usr.sbin/mtree/verify.c | 8 +++++--- 9 files changed, 24 insertions(+), 16 deletions(-) diff --git a/usr.sbin/mtree/Makefile b/usr.sbin/mtree/Makefile index 4197e911382..ebad51b485e 100644 --- a/usr.sbin/mtree/Makefile +++ b/usr.sbin/mtree/Makefile @@ -1,5 +1,5 @@ +# $OpenBSD: Makefile,v 1.2 1996/12/08 01:13:38 niklas Exp $ # $NetBSD: Makefile,v 1.8 1995/03/07 21:12:04 cgd Exp $ -# @(#)Makefile 8.1 (Berkeley) 6/6/93 PROG= mtree #CFLAGS+=-DDEBUG diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c index 1d836c936be..28280aaacc9 100644 --- a/usr.sbin/mtree/compare.c +++ b/usr.sbin/mtree/compare.c @@ -1,5 +1,5 @@ /* $NetBSD: compare.c,v 1.9 1995/10/22 20:12:07 pk Exp $ */ -/* $OpenBSD: compare.c,v 1.3 1996/03/02 00:46:00 tholo Exp $ */ +/* $OpenBSD: compare.c,v 1.4 1996/12/08 01:13:38 niklas Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -77,7 +77,7 @@ compare(name, s, p) register FTSENT *p; { extern int uflag; - u_long len, val; + u_int32_t len, val; int fd, label; char *cp, *tab; @@ -202,7 +202,7 @@ typeerr: LABEL; (void)close(fd); if (s->cksum != val) { LABEL; - (void)printf("%scksum (%lu, %lu)\n", + (void)printf("%scksum (%u, %u)\n", tab, s->cksum, val); } tab = "\t"; diff --git a/usr.sbin/mtree/create.c b/usr.sbin/mtree/create.c index 9c3f9178712..1ecedc63d6f 100644 --- a/usr.sbin/mtree/create.c +++ b/usr.sbin/mtree/create.c @@ -1,5 +1,5 @@ /* $NetBSD: create.c,v 1.9 1995/03/07 21:12:06 cgd Exp $ */ -/* $OpenBSD: create.c,v 1.2 1996/03/02 00:46:02 tholo Exp $ */ +/* $OpenBSD: create.c,v 1.3 1996/12/08 01:13:39 niklas Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -59,7 +59,8 @@ static char rcsid[] = "$NetBSD: create.c,v 1.9 1995/03/07 21:12:06 cgd Exp $"; #define INDENTNAMELEN 15 #define MAXLINELEN 80 -extern int crc_total, ftsoptions; +extern u_int32_t crc_total; +extern int ftsoptions; extern int dflag, sflag; extern u_short keys; extern char fullpath[MAXPATHLEN]; @@ -117,7 +118,7 @@ cwalk() (void)fts_close(t); if (sflag && keys & F_CKSUM) (void)fprintf(stderr, - "mtree: %s checksum: %lu\n", fullpath, crc_total); + "mtree: %s checksum: %u\n", fullpath, crc_total); } static void @@ -126,7 +127,7 @@ statf(p) { struct group *gr; struct passwd *pw; - u_long len, val; + u_int32_t len, val; int fd, indent; if (S_ISDIR(p->fts_statp->st_mode)) @@ -166,7 +167,7 @@ statf(p) crc(fd, &val, &len)) err("%s: %s", p->fts_accpath, strerror(errno)); (void)close(fd); - output(&indent, "cksum=%lu", val); + output(&indent, "cksum=%u", val); } if (keys & F_SLINK && (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) diff --git a/usr.sbin/mtree/extern.h b/usr.sbin/mtree/extern.h index 35bfb49fdc5..456d6da9217 100644 --- a/usr.sbin/mtree/extern.h +++ b/usr.sbin/mtree/extern.h @@ -1,3 +1,4 @@ +/* $OpenBSD: extern.h,v 1.2 1996/12/08 01:13:39 niklas Exp $ */ /* $NetBSD: extern.h,v 1.3 1995/03/07 21:12:07 cgd Exp $ */ /*- @@ -36,7 +37,7 @@ */ int compare __P((char *, NODE *, FTSENT *)); -int crc __P((int, u_long *, u_long *)); +int crc __P((int, u_int32_t *, u_int32_t *)); void cwalk __P((void)); void err __P((const char *, ...)); char *inotype __P((u_int)); diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index f9a50be86c9..23ef86073bc 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -1,3 +1,4 @@ +/* $OpenBSD: misc.c,v 1.2 1996/12/08 01:13:40 niklas Exp $ */ /* $NetBSD: misc.c,v 1.4 1995/03/07 21:26:23 cgd Exp $ */ /*- diff --git a/usr.sbin/mtree/mtree.8 b/usr.sbin/mtree/mtree.8 index 8521f8ae6b9..1ba46089bbe 100644 --- a/usr.sbin/mtree/mtree.8 +++ b/usr.sbin/mtree/mtree.8 @@ -1,3 +1,4 @@ +.\" $OpenBSD: mtree.8,v 1.2 1996/12/08 01:13:41 niklas Exp $ .\" $NetBSD: mtree.8,v 1.4 1995/03/07 21:26:25 cgd Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 diff --git a/usr.sbin/mtree/mtree.c b/usr.sbin/mtree/mtree.c index 5f2de630a4d..d36b3818aa5 100644 --- a/usr.sbin/mtree/mtree.c +++ b/usr.sbin/mtree/mtree.c @@ -1,3 +1,4 @@ +/* $OpenBSD: mtree.c,v 1.2 1996/12/08 01:13:41 niklas Exp $ */ /* $NetBSD: mtree.c,v 1.5 1995/03/07 21:12:10 cgd Exp $ */ /*- @@ -43,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mtree.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$NetBSD: mtree.c,v 1.5 1995/03/07 21:12:10 cgd Exp $"; +static char rcsid[] = "$OpenBSD: mtree.c,v 1.2 1996/12/08 01:13:41 niklas Exp $"; #endif #endif /* not lint */ @@ -56,7 +57,7 @@ static char rcsid[] = "$NetBSD: mtree.c,v 1.5 1995/03/07 21:12:10 cgd Exp $"; #include "mtree.h" #include "extern.h" -extern int crc_total; +extern u_int32_t crc_total; int ftsoptions = FTS_PHYSICAL; int cflag, dflag, eflag, rflag, sflag, uflag; diff --git a/usr.sbin/mtree/mtree.h b/usr.sbin/mtree/mtree.h index 19e670d09dc..113968d1ce3 100644 --- a/usr.sbin/mtree/mtree.h +++ b/usr.sbin/mtree/mtree.h @@ -1,3 +1,4 @@ +/* $OpenBSD: mtree.h,v 1.2 1996/12/08 01:13:42 niklas Exp $ */ /* $NetBSD: mtree.h,v 1.7 1995/03/07 21:26:27 cgd Exp $ */ /*- @@ -48,7 +49,7 @@ typedef struct _node { struct _node *prev, *next; /* left, right */ off_t st_size; /* size */ struct timespec st_mtimespec; /* last modification time */ - u_long cksum; /* check sum */ + u_int32_t cksum; /* check sum */ char *slink; /* symbolic link reference */ uid_t st_uid; /* uid */ gid_t st_gid; /* gid */ diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index feaa75ed457..371cf0384a1 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -1,3 +1,4 @@ +/* $OpenBSD: verify.c,v 1.2 1996/12/08 01:13:42 niklas Exp $ */ /* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */ /*- @@ -37,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $"; +static char rcsid[] = "$OpenBSD: verify.c,v 1.2 1996/12/08 01:13:42 niklas Exp $"; #endif #endif /* not lint */ @@ -52,7 +53,8 @@ static char rcsid[] = "$NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $"; #include "mtree.h" #include "extern.h" -extern int crc_total, ftsoptions; +extern int32_t crc_total; +extern int ftsoptions; extern int dflag, eflag, rflag, sflag, uflag; extern char fullpath[MAXPATHLEN]; @@ -147,7 +149,7 @@ vwalk() (void)fts_close(t); if (sflag) (void)fprintf(stderr, - "mtree: %s checksum: %lu\n", fullpath, crc_total); + "mtree: %s checksum: %u\n", fullpath, crc_total); return (rval); } -- 2.20.1