diff options
author | ken <ken@FreeBSD.org> | 2013-08-28 22:12:56 +0000 |
---|---|---|
committer | ken <ken@FreeBSD.org> | 2013-08-28 22:12:56 +0000 |
commit | 0b320ea37ccd739f0e5da8571e54526816726956 (patch) | |
tree | c534057a92f5a3a81ee560818ba4556eb812da6d /sys/fs | |
parent | baaacfdc28bae3ef25b6e173c058f66a64c7f18d (diff) | |
download | FreeBSD-src-0b320ea37ccd739f0e5da8571e54526816726956.zip FreeBSD-src-0b320ea37ccd739f0e5da8571e54526816726956.tar.gz |
Support storing 7 additional file flags in tmpfs:
UF_SYSTEM, UF_SPARSE, UF_OFFLINE, UF_REPARSE, UF_ARCHIVE, UF_READONLY,
and UF_HIDDEN.
Sort the file flags tmpfs supports alphabetically. tmpfs now
supports the same flags as UFS, with the exception of SF_SNAPSHOT.
Reported by: bdrewery, antoine
Sponsored by: Spectra Logic
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/tmpfs/tmpfs_subr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 94498ff..ec96936 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1433,9 +1433,10 @@ tmpfs_chflags(struct vnode *vp, u_long flags, struct ucred *cred, node = VP_TO_TMPFS_NODE(vp); - if ((flags & ~(UF_NODUMP | UF_IMMUTABLE | UF_APPEND | UF_OPAQUE | - UF_NOUNLINK | SF_ARCHIVED | SF_IMMUTABLE | SF_APPEND | - SF_NOUNLINK)) != 0) + if ((flags & ~(SF_APPEND | SF_ARCHIVED | SF_IMMUTABLE | SF_NOUNLINK | + UF_APPEND | UF_ARCHIVE | UF_HIDDEN | UF_IMMUTABLE | UF_NODUMP | + UF_NOUNLINK | UF_OFFLINE | UF_OPAQUE | UF_READONLY | UF_REPARSE | + UF_SPARSE | UF_SYSTEM)) != 0) return (EOPNOTSUPP); /* Disallow this operation if the file system is mounted read-only. */ |