From b38f097029665f4ece801ca129913d36f757b49c Mon Sep 17 00:00:00 2001 From: ck153898 Date: Mon, 10 Dec 2007 12:25:48 -0800 Subject: 6627223 gfs needs to support extended dirent flags --- usr/src/uts/common/fs/ctfs/ctfs_tdir.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'usr/src/uts/common/fs/ctfs/ctfs_tdir.c') diff --git a/usr/src/uts/common/fs/ctfs/ctfs_tdir.c b/usr/src/uts/common/fs/ctfs/ctfs_tdir.c index fd3c229c0f..ce83fa5097 100644 --- a/usr/src/uts/common/fs/ctfs/ctfs_tdir.c +++ b/usr/src/uts/common/fs/ctfs/ctfs_tdir.c @@ -56,8 +56,8 @@ static gfs_dirent_t ctfs_tdir_dirents[] = { }; #define CTFS_NSPECIALS ((sizeof ctfs_tdir_dirents / sizeof (gfs_dirent_t)) - 1) -static int ctfs_tdir_do_readdir(vnode_t *, struct dirent64 *, int *, offset_t *, - offset_t *, void *); +static int ctfs_tdir_do_readdir(vnode_t *, void *, int *, offset_t *, + offset_t *, void *, int); static int ctfs_tdir_do_lookup(vnode_t *, const char *, vnode_t **, ino64_t *, cred_t *); static ino64_t ctfs_tdir_do_inode(vnode_t *, int); @@ -107,12 +107,17 @@ ctfs_tdir_do_inode(vnode_t *vp, int index) /* ARGSUSED */ static int -ctfs_tdir_do_readdir(vnode_t *vp, struct dirent64 *dp, int *eofp, - offset_t *offp, offset_t *nextp, void *data) +ctfs_tdir_do_readdir(vnode_t *vp, void *dp, int *eofp, + offset_t *offp, offset_t *nextp, void *data, int flags) { uint64_t zuniqid; ctid_t next; ct_type_t *ty = ct_types[gfs_file_index(vp)]; + struct dirent64 *odp = dp; + + /* ctfs does not support V_RDDIR_ENTFLAGS */ + if (flags & V_RDDIR_ENTFLAGS) + return (ENOTSUP); zuniqid = VTOZONE(vp)->zone_uniqid; next = contract_type_lookup(ty, zuniqid, *offp); @@ -122,8 +127,8 @@ ctfs_tdir_do_readdir(vnode_t *vp, struct dirent64 *dp, int *eofp, return (0); } - dp->d_ino = CTFS_INO_CT_DIR(next); - numtos(next, dp->d_name); + odp->d_ino = CTFS_INO_CT_DIR(next); + numtos(next, odp->d_name); *offp = next; *nextp = next + 1; -- cgit v1.2.3