summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/spec.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/mtree/spec.c')
-rw-r--r--usr.sbin/mtree/spec.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c
index 4a23073..3fa9e7c 100644
--- a/usr.sbin/mtree/spec.c
+++ b/usr.sbin/mtree/spec.c
@@ -172,10 +172,10 @@ noparent: errx(1, "line %d: no parent node", lineno);
static void
set(t, ip)
char *t;
- register NODE *ip;
+ NODE *ip;
{
register int type;
- register char *kw, *val = NULL;
+ char *kw, *val = NULL;
struct group *gr;
struct passwd *pw;
mode_t *m;
@@ -211,6 +211,12 @@ set(t, ip)
errx(1, "strdup");
}
break;
+ case F_FLAGS:
+ if (strcmp("none", val) == 0)
+ ip->st_flags = 0;
+ else if (string_to_flags(&val, &ip->st_flags,NULL) != 0)
+ errx(1, "line %d: invalid flag %s",lineno, val);
+ break;
case F_GID:
ip->st_gid = strtoul(val, &ep, 10);
if (*ep)
OpenPOWER on IntegriCloud