diff options
author | Josef Karthauser <joe@FreeBSD.org> | 1999-12-09 20:38:36 +0000 |
---|---|---|
committer | Josef Karthauser <joe@FreeBSD.org> | 1999-12-09 20:38:36 +0000 |
commit | 68bc9a5737fe2e8c693656b93c136ce2e1aa79c3 (patch) | |
tree | 94a91a2a2dd10f41c853bbbeb9f92cc2b7996786 /usr.sbin/mtree/spec.c | |
parent | f2cbe161be98af8a950706a9d98953d9b0034d14 (diff) | |
download | src-68bc9a5737fe2e8c693656b93c136ce2e1aa79c3.tar.gz src-68bc9a5737fe2e8c693656b93c136ce2e1aa79c3.zip |
Added support for file flags, mostly merged from the NetBSD version.
The way is now open to schg and sappnd key files and directories in
our tree. There are recommendations in bin/15229.
PR: bin/15229
Reviewed by: imp, brian
Notes
Notes:
svn path=/head/; revision=54375
Diffstat (limited to 'usr.sbin/mtree/spec.c')
-rw-r--r-- | usr.sbin/mtree/spec.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/mtree/spec.c b/usr.sbin/mtree/spec.c index 4a230731a8b8..3fa9e7ca9d40 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) |