summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_extattr.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2003-06-05 05:55:34 +0000
committerRobert Watson <rwatson@FreeBSD.org>2003-06-05 05:55:34 +0000
commit777621799b2ad18c92d9ecf68f57c38594c57a55 (patch)
treedb061588e68b6919ee6a8aba0b43d65006648400 /sys/kern/vfs_extattr.c
parenta6f1342ff6c35218af4e8b256ee7074f00d25c6c (diff)
Notes
Diffstat (limited to 'sys/kern/vfs_extattr.c')
-rw-r--r--sys/kern/vfs_extattr.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 8987fb771353..fed094c2df39 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -88,6 +88,9 @@ static int setutimes(struct thread *td, struct vnode *,
static int vn_access(struct vnode *vp, int user_flags, struct ucred *cred,
struct thread *td);
+static int extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
+ size_t nbytes, struct thread *td);
+
int (*union_dircheckp)(struct thread *td, struct vnode **, struct file *);
int (*softdep_fsync_hook)(struct vnode *);
@@ -4052,6 +4055,15 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname,
size_t size, *sizep;
int error;
+ /*
+ * XXX: Temporary API compatibility for applications that know
+ * about this hack ("" means list), but haven't been updated
+ * for the extattr_list_*() system calls yet. This will go
+ * away for FreeBSD 5.3.
+ */
+ if (strlen(attrname) == 0)
+ return (extattr_list_vp(vp, attrnamespace, data, nbytes, td));
+
VOP_LEASE(vp, td, td->td_ucred, LEASE_READ);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
@@ -4371,7 +4383,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
goto done;
#endif
- error = VOP_GETEXTATTR(vp, attrnamespace, "", auiop, sizep,
+ error = VOP_LISTEXTATTR(vp, attrnamespace, auiop, sizep,
td->td_ucred, td);
if (auiop != NULL) {