diff options
author | brooks <brooks@FreeBSD.org> | 2013-10-23 17:59:17 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2013-10-23 17:59:17 +0000 |
commit | caa64dbe94775328829119d3737c0b4e2bbd543c (patch) | |
tree | 831535e50726926df75280a6a9fecc53cb0f0043 /contrib/mtree/compare.c | |
parent | 8f0de933137355baabf4f2a1dad416843e634a41 (diff) | |
download | FreeBSD-src-caa64dbe94775328829119d3737c0b4e2bbd543c.zip FreeBSD-src-caa64dbe94775328829119d3737c0b4e2bbd543c.tar.gz |
MFC r256687:
Upgrade to the latest version of mtree from NetBSD. This revision
re-removes the printing of size for non-regular files, supports
type-less root (.) entries as seen in a couple ports, and corrects a bug
in -N that caused expanded Subversion $FreeBSD$ strings in comments to
be processed as /etc/group entries.
Includes one trivial portability fix (including <stdint.h> in three
files) that has been committed upstream.
Approved by: re (glebius)
Diffstat (limited to 'contrib/mtree/compare.c')
-rw-r--r-- | contrib/mtree/compare.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/mtree/compare.c b/contrib/mtree/compare.c index d2389e6..af2fd31 100644 --- a/contrib/mtree/compare.c +++ b/contrib/mtree/compare.c @@ -1,4 +1,4 @@ -/* $NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $ */ +/* $NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)compare.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $"); +__RCSID("$NetBSD: compare.c,v 1.56 2013/09/09 23:27:43 christos Exp $"); #endif #endif /* not lint */ @@ -47,6 +47,7 @@ __RCSID("$NetBSD: compare.c,v 1.55 2012/10/05 00:59:35 christos Exp $"); #include <errno.h> #include <fcntl.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -192,9 +193,9 @@ typeerr: LABEL; (s->type == F_BLOCK || s->type == F_CHAR) && s->st_rdev != p->fts_statp->st_rdev) { LABEL; - printf("%sdevice (%#llx, %#llx", - tab, (long long)s->st_rdev, - (long long)p->fts_statp->st_rdev); + printf("%sdevice (%#jx, %#jx", + tab, (uintmax_t)s->st_rdev, + (uintmax_t)p->fts_statp->st_rdev); if (uflag) { if ((unlink(p->fts_accpath) == -1) || (mknod(p->fts_accpath, @@ -283,9 +284,9 @@ typeerr: LABEL; } if (s->flags & F_SIZE && s->st_size != p->fts_statp->st_size) { LABEL; - printf("%ssize (%lld, %lld)\n", - tab, (long long)s->st_size, - (long long)p->fts_statp->st_size); + printf("%ssize (%ju, %ju)\n", + tab, (uintmax_t)s->st_size, + (uintmax_t)p->fts_statp->st_size); tab = "\t"; } /* |