Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/namei.h
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | struct nameidata { | ||||
char *ni_next; /* next location in pathname */ | char *ni_next; /* next location in pathname */ | ||||
/* | /* | ||||
* Lookup parameters: this structure describes the subset of | * Lookup parameters: this structure describes the subset of | ||||
* information from the nameidata structure that is passed | * information from the nameidata structure that is passed | ||||
* through the VOP interface. | * through the VOP interface. | ||||
*/ | */ | ||||
struct componentname ni_cnd; | struct componentname ni_cnd; | ||||
struct nameicap_tracker_head ni_cap_tracker; | struct nameicap_tracker_head ni_cap_tracker; | ||||
struct vnode *ni_beneath_latch; | |||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
enum cache_fpl_status { CACHE_FPL_STATUS_DESTROYED, CACHE_FPL_STATUS_ABORTED, | enum cache_fpl_status { CACHE_FPL_STATUS_DESTROYED, CACHE_FPL_STATUS_ABORTED, | ||||
CACHE_FPL_STATUS_PARTIAL, CACHE_FPL_STATUS_HANDLED, CACHE_FPL_STATUS_UNSET }; | CACHE_FPL_STATUS_PARTIAL, CACHE_FPL_STATUS_HANDLED, CACHE_FPL_STATUS_UNSET }; | ||||
int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, | int cache_fplookup(struct nameidata *ndp, enum cache_fpl_status *status, | ||||
struct pwd **pwdp); | struct pwd **pwdp); | ||||
Show All 17 Lines | |||||
#define NC_NOMAKEENTRY 0x0001 /* name must not be added to cache */ | #define NC_NOMAKEENTRY 0x0001 /* name must not be added to cache */ | ||||
#define NC_KEEPPOSENTRY 0x0002 /* don't evict a positive entry */ | #define NC_KEEPPOSENTRY 0x0002 /* don't evict a positive entry */ | ||||
#define NOCACHE NC_NOMAKEENTRY /* for compatibility with older code */ | #define NOCACHE NC_NOMAKEENTRY /* for compatibility with older code */ | ||||
#define LOCKLEAF 0x0004 /* lock vnode on return */ | #define LOCKLEAF 0x0004 /* lock vnode on return */ | ||||
#define LOCKPARENT 0x0008 /* want parent vnode returned locked */ | #define LOCKPARENT 0x0008 /* want parent vnode returned locked */ | ||||
#define WANTPARENT 0x0010 /* want parent vnode returned unlocked */ | #define WANTPARENT 0x0010 /* want parent vnode returned unlocked */ | ||||
#define FAILIFEXISTS 0x0020 /* return EEXIST if found */ | #define FAILIFEXISTS 0x0020 /* return EEXIST if found */ | ||||
#define FOLLOW 0x0040 /* follow symbolic links */ | #define FOLLOW 0x0040 /* follow symbolic links */ | ||||
#define BENEATH 0x0080 /* No escape from the start dir */ | |||||
#define LOCKSHARED 0x0100 /* Shared lock leaf */ | #define LOCKSHARED 0x0100 /* Shared lock leaf */ | ||||
#define NOFOLLOW 0x0000 /* do not follow symbolic links (pseudo) */ | #define NOFOLLOW 0x0000 /* do not follow symbolic links (pseudo) */ | ||||
#define RBENEATH 0x100000000ULL /* No escape, even tmp, from start dir */ | #define RBENEATH 0x100000000ULL /* No escape, even tmp, from start dir */ | ||||
#define MODMASK 0xf000001ffULL /* mask of operational modifiers */ | #define MODMASK 0xf000001ffULL /* mask of operational modifiers */ | ||||
/* | /* | ||||
* Namei parameter descriptors. | * Namei parameter descriptors. | ||||
* | * | ||||
* SAVENAME may be set by either the callers of namei or by VOP_LOOKUP. | * SAVENAME may be set by either the callers of namei or by VOP_LOOKUP. | ||||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
#define NIRES_ABS 0x00000001 /* Path was absolute */ | #define NIRES_ABS 0x00000001 /* Path was absolute */ | ||||
#define NIRES_STRICTREL 0x00000002 /* Restricted lookup result */ | #define NIRES_STRICTREL 0x00000002 /* Restricted lookup result */ | ||||
/* | /* | ||||
* Flags in ni_lcf, valid for the duration of the namei call. | * Flags in ni_lcf, valid for the duration of the namei call. | ||||
*/ | */ | ||||
#define NI_LCF_STRICTRELATIVE 0x0001 /* relative lookup only */ | #define NI_LCF_STRICTRELATIVE 0x0001 /* relative lookup only */ | ||||
#define NI_LCF_CAP_DOTDOT 0x0002 /* ".." in strictrelative case */ | #define NI_LCF_CAP_DOTDOT 0x0002 /* ".." in strictrelative case */ | ||||
#define NI_LCF_BENEATH_ABS 0x0004 /* BENEATH with absolute path */ | |||||
#define NI_LCF_BENEATH_LATCHED 0x0008 /* BENEATH_ABS traversed starting dir */ | |||||
#define NI_LCF_LATCH 0x0010 /* ni_beneath_latch valid */ | |||||
/* | /* | ||||
* Initialization of a nameidata structure. | * Initialization of a nameidata structure. | ||||
*/ | */ | ||||
#define NDINIT(ndp, op, flags, segflg, namep, td) \ | #define NDINIT(ndp, op, flags, segflg, namep, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, &cap_no_rights, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, &cap_no_rights, td) | ||||
#define NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td) \ | #define NDINIT_AT(ndp, op, flags, segflg, namep, dirfd, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, &cap_no_rights, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, &cap_no_rights, td) | ||||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |