path: root/sys/sys/extattr.h
diff options
authorRobert Watson <rwatson@FreeBSD.org>2002-02-10 04:43:22 +0000
committerRobert Watson <rwatson@FreeBSD.org>2002-02-10 04:43:22 +0000
commit74237f55b0ff7b9aa10bdcb241024527ed1433e3 (patch)
treee9458f6a52b269cdc1552a27ae5ddf17ae6024ee /sys/sys/extattr.h
parente751b85f6fb74ea1ad567d3c2ef8d8ecf6112382 (diff)
Part I: Update extended attribute API and ABI:
o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
Notes: svn path=/head/; revision=90448
Diffstat (limited to 'sys/sys/extattr.h')
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h
index bca21bd4d792..2d656241cdbd 100644
--- a/sys/sys/extattr.h
+++ b/sys/sys/extattr.h
@@ -55,14 +55,14 @@ int extattrctl(const char *_path, int _cmd, const char *_filename,
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);
+ssize_t extattr_get_fd(int _fd, int _attrnamespace, const char *_attrname,
+ void *_data, size_t _nbytes);
+ssize_t extattr_get_file(const char *_path, int _attrnamespace,
+ const char *_attrname, void *_data, size_t _nbytes);
int extattr_set_fd(int _fd, int _attrnamespace, const char *_attrname,
- struct iovec *_iovp, unsigned _iovcnt);
+ const void *_data, size_t _nbytes);
int extattr_set_file(const char *_path, int _attrnamespace,
- const char *_attrname, struct iovec *_iovp, unsigned _iovcnt);
+ const char *_attrname, const void *_data, size_t _nbytes);
#endif /* !_KERNEL */