diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-03-31 16:20:05 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-03-31 16:20:05 +0000 |
commit | cb4f33ea3159d458714cc82ae47bdeca7b9d636f (patch) | |
tree | 6c91438e0bae4ef89921aa2478673f15ddd9b7e3 /sys/sys/extattr.h | |
parent | 1d52622861ade01fba488110e63ed8ba868cfcdf (diff) | |
download | FreeBSD-src-cb4f33ea3159d458714cc82ae47bdeca7b9d636f.zip FreeBSD-src-cb4f33ea3159d458714cc82ae47bdeca7b9d636f.tar.gz |
o Introduce extattr_{delete,get,set}_fd() to allow extended attribute
operations on file descriptors, which complement the existing set of
calls, extattr_{delete,get,set}_file() which act on paths. In doing
so, restructure the system call implementation such that the two sets
of functions share most of the relevant code, rather than duplicating
it. This pushes the vnode locking into the shared code, but keeps
the copying in of some arguments in the system call code. Allowing
access via file descriptors reduces the opportunity for race
conditions when managing extended attributes.
Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/sys/extattr.h')
-rw-r--r-- | sys/sys/extattr.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h index dbde540..d53ab03 100644 --- a/sys/sys/extattr.h +++ b/sys/sys/extattr.h @@ -57,14 +57,19 @@ struct iovec; __BEGIN_DECLS -int extattrctl(const char *path, int cmd, const char *filename, - int attrnamespace, const char *attrname); -int extattr_delete_file(const char *path, int attrnamespace, - const char *attrname); -int extattr_get_file(const char *path, int attrnamespace, - const char *attrname, struct iovec *iovp, unsigned iovcnt); -int extattr_set_file(const char *path, int attrnamespace, - const char *attrname, struct iovec *iovp, unsigned iovcnt); +int extattrctl(const char *_path, int _cmd, const char *_filename, + int _attrnamespace, const char *_attrname); +int extattr_delete_fd(int _fd, int _attrnamespace, const char *_attrname); +int extattr_delete_file(const char *_path, int _attrnamespace, + const char *_attrname); +int extattr_get_fd(int _fd, int _attrnamespace, const char *_attrname, + struct iovec *_iovp, unsigned _iovcnt); +int extattr_get_file(const char *_path, int _attrnamespace, + const char *_attrname, struct iovec *_iovp, unsigned _iovcnt); +int extattr_set_fd(int _fd, int _attrnamespace, const char *_attrname, + struct iovec *_iovp, unsigned _iovcnt); +int extattr_set_file(const char *_path, int _attrnamespace, + const char *_attrname, struct iovec *_iovp, unsigned _iovcnt); __END_DECLS #endif /* !_KERNEL */ |