MFC an 'optional' keyword.

This commit is contained in:
maxim 2006-07-28 16:27:40 +00:00
parent e0f9167544
commit 0ab2673d57
4 changed files with 10 additions and 1 deletions

@ -28,7 +28,7 @@
.\" From: @(#)mtree.8 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
.Dd March 29, 2005
.Dd July 03, 2006
.Dt MTREE 8
.Os
.Sh NAME
@ -221,6 +221,9 @@ value.
The number of hard links the file is expected to have.
.It Cm nochange
Make sure this file or directory exists but otherwise ignore all attributes.
.It Cm optional
The file is optional; do not complain about the file if it is
not in the file hierarchy.
.It Cm uid
The file owner as a numeric value.
.It Cm uname

@ -78,6 +78,7 @@ typedef struct _node {
#define F_RMD160 0x40000 /* RIPEMD160 digest */
#define F_FLAGS 0x80000 /* file flags */
#define F_SHA256 0x100000 /* SHA-256 digest */
#define F_OPT 0x200000 /* existence optional */
u_int flags; /* items set */
#define F_BLOCK 0x001 /* block special */

@ -236,6 +236,9 @@ set(char *t, NODE *ip)
errx(1, "line %d: invalid link count %s",
lineno, val);
break;
case F_OPT:
/* just set flag bit */
break;
case F_SIZE:
ip->st_size = strtoq(val, &ep, 10);
if (*ep)

@ -158,6 +158,8 @@ miss(NODE *p, char *tail)
int serr;
for (; p; p = p->next) {
if (p->flags & F_OPT && !(p->flags & F_VISIT))
continue;
if (p->type != F_DIR && (dflag || p->flags & F_VISIT))
continue;
(void)strcpy(tail, p->name);