diff options
Diffstat (limited to 'sys/sys/namei.h')
-rw-r--r-- | sys/sys/namei.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/sys/namei.h b/sys/sys/namei.h index 69148cc..478ff33 100644 --- a/sys/sys/namei.h +++ b/sys/sys/namei.h @@ -69,6 +69,7 @@ struct nameidata { struct vnode *ni_startdir; /* starting directory */ struct vnode *ni_rootdir; /* logical root directory */ struct vnode *ni_topdir; /* logical top directory */ + int ni_dirfd; /* starting directory for *at functions */ /* * Results: returned from/manipulated by lookup */ @@ -148,19 +149,22 @@ struct nameidata { /* * Initialization of a nameidata structure. */ -static void NDINIT(struct nameidata *, u_long, u_long, enum uio_seg, - const char *, struct thread *); +#define NDINIT(ndp, op, flags, segflg, namep, td) \ + NDINIT_AT(ndp, op, flags, segflg, namep, AT_FDCWD, td) + static __inline void -NDINIT(struct nameidata *ndp, +NDINIT_AT(struct nameidata *ndp, u_long op, u_long flags, enum uio_seg segflg, const char *namep, + int dirfd, struct thread *td) { ndp->ni_cnd.cn_nameiop = op; ndp->ni_cnd.cn_flags = flags; ndp->ni_segflg = segflg; ndp->ni_dirp = namep; + ndp->ni_dirfd = dirfd; ndp->ni_cnd.cn_thread = td; } |