summaryrefslogtreecommitdiffstats
path: root/sys/fs
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/fs
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/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 ba0a93b..4017978 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 0c8bdc3..42662ea 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);
OpenPOWER on IntegriCloud