From 41fe15c4d303bc22860684fa1e7da66107679bc4 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 9 Mar 2002 18:54:20 +0000 Subject: Rename the new 'preserve' flag to 'nochange' for consistency with FreeBSD. The old 'preserve' name is still accepted but is not documented and will be removed in the future. --- usr.sbin/mtree/misc.c | 5 +++-- usr.sbin/mtree/mtree.8 | 6 +++--- usr.sbin/mtree/mtree.h | 4 ++-- usr.sbin/mtree/verify.c | 6 +++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/usr.sbin/mtree/misc.c b/usr.sbin/mtree/misc.c index a8056c8de83..79618d0149f 100644 --- a/usr.sbin/mtree/misc.c +++ b/usr.sbin/mtree/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.12 2002/03/04 19:56:39 millert Exp $ */ +/* $OpenBSD: misc.c,v 1.13 2002/03/09 18:54:19 millert Exp $ */ /* $NetBSD: misc.c,v 1.4 1995/03/07 21:26:23 cgd Exp $ */ /*- @@ -65,8 +65,9 @@ static KEY keylist[] = { {"md5digest", F_MD5, NEEDVALUE}, {"mode", F_MODE, NEEDVALUE}, {"nlink", F_NLINK, NEEDVALUE}, + {"nochange", F_NOCHANGE, 0}, {"optional", F_OPT, 0}, - {"preserve", F_PRESERVE, 0}, + {"preserve", F_NOCHANGE, 0}, {"rmd160digest",F_RMD160, NEEDVALUE}, {"sha1digest", F_SHA1, NEEDVALUE}, {"size", F_SIZE, NEEDVALUE}, diff --git a/usr.sbin/mtree/mtree.8 b/usr.sbin/mtree/mtree.8 index b126cf8e1c9..e747e7185d3 100644 --- a/usr.sbin/mtree/mtree.8 +++ b/usr.sbin/mtree/mtree.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mtree.8,v 1.19 2002/03/04 19:56:39 millert Exp $ +.\" $OpenBSD: mtree.8,v 1.20 2002/03/09 18:54:19 millert Exp $ .\" $NetBSD: mtree.8,v 1.4 1995/03/07 21:26:25 cgd Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 @@ -181,11 +181,11 @@ The current file's permissions as a numeric (octal) or symbolic value. .It Cm nlink The number of hard links the file is expected to have. +.It Cm nochange +Do not change the attributes (owner, group, mode, etc) on a file or directory. .It Cm optional The file is optional; don't complain about the file if it's not in the file hierarchy. -.It Cm preserve -The file's attributes should be preserved; don't change owner, group, mode, etc. .It Cm rmd160digest The RIPEMD-160 message digest of the file. .It Cm sha1digest diff --git a/usr.sbin/mtree/mtree.h b/usr.sbin/mtree/mtree.h index a27c3297843..960bd94b5d6 100644 --- a/usr.sbin/mtree/mtree.h +++ b/usr.sbin/mtree/mtree.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mtree.h,v 1.8 2002/03/04 19:56:39 millert Exp $ */ +/* $OpenBSD: mtree.h,v 1.9 2002/03/09 18:54:19 millert Exp $ */ /* $NetBSD: mtree.h,v 1.7 1995/03/07 21:26:27 cgd Exp $ */ /*- @@ -81,7 +81,7 @@ typedef struct _node { #define F_UNAME 0x020000 /* user name */ #define F_VISIT 0x040000 /* file visited */ #define F_FLAGS 0x080000 /* file flags */ -#define F_PRESERVE 0x100000 /* preserve attributes */ +#define F_NOCHANGE 0x100000 /* do not change owner/mode */ u_int32_t flags; /* items set */ #define F_BLOCK 0x001 /* block special */ diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c index f834c0b093e..a864fda9326 100644 --- a/usr.sbin/mtree/verify.c +++ b/usr.sbin/mtree/verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: verify.c,v 1.9 2002/03/04 19:56:39 millert Exp $ */ +/* $OpenBSD: verify.c,v 1.10 2002/03/09 18:54:19 millert Exp $ */ /* $NetBSD: verify.c,v 1.10 1995/03/07 21:26:28 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static const char sccsid[] = "@(#)verify.c 8.1 (Berkeley) 6/6/93"; #else -static const char rcsid[] = "$OpenBSD: verify.c,v 1.9 2002/03/04 19:56:39 millert Exp $"; +static const char rcsid[] = "$OpenBSD: verify.c,v 1.10 2002/03/09 18:54:19 millert Exp $"; #endif #endif /* not lint */ @@ -119,7 +119,7 @@ vwalk() !fnmatch(ep->name, p->fts_name, FNM_PATHNAME)) || !strcmp(ep->name, p->fts_name)) { ep->flags |= F_VISIT; - if ((ep->flags & F_PRESERVE) == 0 && + if ((ep->flags & F_NOCHANGE) == 0 && compare(ep->name, ep, p)) rval = MISMATCHEXIT; if (ep->flags & F_IGN) -- cgit v1.2.3