Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/namei.h
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
#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 NOCACHE 0x0020 /* name must not be left in cache */ | #define NOCACHE 0x0020 /* name must not be left in cache */ | ||||
#define FOLLOW 0x0040 /* follow symbolic links */ | #define FOLLOW 0x0040 /* follow symbolic links */ | ||||
#define BENEATH 0x0080 /* No escape from the start dir */ | #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 MODMASK 0x01fc /* mask of operational modifiers */ | #define RBENEATH 0x100000000ULL /* XXX */ | ||||
#define MODMASK 0xf000001fcULL /* mask of operational modifiers */ | |||||
markj: Why does the mask have to be split? | |||||
Done Inline ActionsThere is no more bits in the MODMASK. Layout it: 2 bits for op, then 7 bits for modmask, then 22 bits parameters descriptors (see below). I do not want to break this KBI (again). kib: There is no more bits in the MODMASK. Layout it: 2 bits for op, then 7 bits for modmask, then… | |||||
/* | /* | ||||
* 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. | ||||
* If the caller of namei sets the flag (for example execve wants to | * If the caller of namei sets the flag (for example execve wants to | ||||
* know the name of the program that is being executed), then it must | * know the name of the program that is being executed), then it must | ||||
* free the buffer. If VOP_LOOKUP sets the flag, then the buffer must | * free the buffer. If VOP_LOOKUP sets the flag, then the buffer must | ||||
* be freed by either the commit routine or the VOP_ABORT routine. | * be freed by either the commit routine or the VOP_ABORT routine. | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | #define NDINIT(ndp, op, flags, segflg, namep, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, 0, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, NULL, 0, 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, 0, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, 0, td) | ||||
#define NDINIT_ATRIGHTS(ndp, op, flags, segflg, namep, dirfd, rightsp, td) \ | #define NDINIT_ATRIGHTS(ndp, op, flags, segflg, namep, dirfd, rightsp, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, rightsp, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, dirfd, NULL, rightsp, td) | ||||
#define NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td) \ | #define NDINIT_ATVP(ndp, op, flags, segflg, namep, vp, td) \ | ||||
NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, 0, td) | NDINIT_ALL(ndp, op, flags, segflg, namep, AT_FDCWD, vp, 0, td) | ||||
void NDINIT_ALL(struct nameidata *ndp, u_long op, u_long flags, | void NDINIT_ALL(struct nameidata *ndp, u_long op, u_int64_t flags, | ||||
enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir, | enum uio_seg segflg, const char *namep, int dirfd, struct vnode *startdir, | ||||
cap_rights_t *rightsp, struct thread *td); | cap_rights_t *rightsp, struct thread *td); | ||||
#define NDF_NO_DVP_RELE 0x00000001 | #define NDF_NO_DVP_RELE 0x00000001 | ||||
#define NDF_NO_DVP_UNLOCK 0x00000002 | #define NDF_NO_DVP_UNLOCK 0x00000002 | ||||
#define NDF_NO_DVP_PUT 0x00000003 | #define NDF_NO_DVP_PUT 0x00000003 | ||||
#define NDF_NO_VP_RELE 0x00000004 | #define NDF_NO_VP_RELE 0x00000004 | ||||
#define NDF_NO_VP_UNLOCK 0x00000008 | #define NDF_NO_VP_UNLOCK 0x00000008 | ||||
Show All 30 Lines |
Why does the mask have to be split?