+# $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
/* $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
register FTSENT *p;
{
extern int uflag;
- u_long len, val;
+ u_int32_t len, val;
int fd, label;
char *cp, *tab;
(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";
/* $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
#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];
(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
{
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))
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))
+/* $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 $ */
/*-
*/
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));
+/* $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 $ */
/*-
+.\" $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
+/* $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 $ */
/*-
#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 */
#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;
+/* $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 $ */
/*-
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 */
+/* $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 $ */
/*-
#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 */
#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];
(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);
}