summaryrefslogtreecommitdiffstats
path: root/sys/sys/extattr.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-02-10 04:43:22 +0000
committerrwatson <rwatson@FreeBSD.org>2002-02-10 04:43:22 +0000
commit6ca91a055cc0b7ae8fca8dc8f4f4588898cd0eab (patch)
treee9458f6a52b269cdc1552a27ae5ddf17ae6024ee /sys/sys/extattr.h
parenta752dc58a831465c48efeea646d4fb6a555f80b7 (diff)
downloadFreeBSD-src-6ca91a055cc0b7ae8fca8dc8f4f4588898cd0eab.zip
FreeBSD-src-6ca91a055cc0b7ae8fca8dc8f4f4588898cd0eab.tar.gz
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
Diffstat (limited to 'sys/sys/extattr.h')
-rw-r--r--sys/sys/extattr.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h
index bca21bd..2d65624 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);
__END_DECLS
#endif /* !_KERNEL */
OpenPOWER on IntegriCloud