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 All 33 Lines | |||||
#define NAMEI_INTERNAL_FLAGS \ | #define NAMEI_INTERNAL_FLAGS \ | ||||
(HASBUF | NOEXECCHECK | MAKEENTRY | ISSYMLINK | ISLASTCN | ISDOTDOT | \ | (HASBUF | NOEXECCHECK | MAKEENTRY | ISSYMLINK | ISLASTCN | ISDOTDOT | \ | ||||
TRAILINGSLASH) | TRAILINGSLASH) | ||||
/* | /* | ||||
* Namei results flags | * Namei results flags | ||||
*/ | */ | ||||
#define NIRES_ABS 0x00000001 /* Path was absolute */ | #define NIRES_ABS 0x00000001 /* Path was absolute */ | ||||
#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_ABS 0x0004 /* BENEATH with absolute path */ | ||||
#define NI_LCF_BENEATH_LATCHED 0x0008 /* BENEATH_ABS traversed starting dir */ | #define NI_LCF_BENEATH_LATCHED 0x0008 /* BENEATH_ABS traversed starting dir */ | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |
Why does the mask have to be split?