aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
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/fs
parente751b85f6fb74ea1ad567d3c2ef8d8ecf6112382 (diff)
downloadsrc-74237f55b0ff7b9aa10bdcb241024527ed1433e3.tar.gz
src-74237f55b0ff7b9aa10bdcb241024527ed1433e3.zip
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
Notes: svn path=/head/; revision=90448
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/pseudofs/pseudofs.h2
-rw-r--r--sys/fs/pseudofs/pseudofs_vnops.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h
index ba0a93b11e69..4017978b6531 100644
--- a/sys/fs/pseudofs/pseudofs.h
+++ b/sys/fs/pseudofs/pseudofs.h
@@ -138,7 +138,7 @@ typedef int (*pfs_ioctl_t)(PFS_IOCTL_ARGS);
#define PFS_GETEXTATTR_ARGS \
struct thread *td, struct proc *p, struct pfs_node *pn, \
int attrnamespace, const char *name, struct uio *uio, \
- struct ucred *cred
+ size_t *size, struct ucred *cred
#define PFS_GETEXTATTR_PROTO(name) \
int name(PFS_GETEXTATTR_ARGS);
struct ucred;
diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c
index 0c8bdc31577b..42662ea65737 100644
--- a/sys/fs/pseudofs/pseudofs_vnops.c
+++ b/sys/fs/pseudofs/pseudofs_vnops.c
@@ -283,7 +283,7 @@ pfs_getextattr(struct vop_getextattr_args *va)
}
error = (pn->pn_getextattr)(curthread, proc, pn, va->a_attrnamespace,
- va->a_name, va->a_uio, va->a_cred);
+ va->a_name, va->a_uio, va->a_size, va->a_cred);
if (proc != NULL)
PRELE(proc);