Changeset View
Changeset View
Standalone View
Standalone View
head/sys/fs/nfsclient/nfs_clport.c
Show First 20 Lines • Show All 628 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
union { | union { | ||||
u_int32_t lval; | u_int32_t lval; | ||||
u_int8_t cval[4]; | u_int8_t cval[4]; | ||||
} tl; | } tl; | ||||
struct proc *p; | struct proc *p; | ||||
if (id == NULL) { | if (id == NULL) { | ||||
printf("NULL id\n"); | /* Return the single open_owner of all 0 bytes. */ | ||||
bzero(cp, NFSV4CL_LOCKNAMELEN); | bzero(cp, NFSV4CL_LOCKNAMELEN); | ||||
return; | return; | ||||
} | } | ||||
if ((flags & F_POSIX) != 0) { | if ((flags & F_POSIX) != 0) { | ||||
p = (struct proc *)id; | p = (struct proc *)id; | ||||
tl.lval = p->p_pid; | tl.lval = p->p_pid; | ||||
*cp++ = tl.cval[0]; | *cp++ = tl.cval[0]; | ||||
*cp++ = tl.cval[1]; | *cp++ = tl.cval[1]; | ||||
▲ Show 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | |||||
nfscl_procdoesntexist(u_int8_t *own) | nfscl_procdoesntexist(u_int8_t *own) | ||||
{ | { | ||||
union { | union { | ||||
u_int32_t lval; | u_int32_t lval; | ||||
u_int8_t cval[4]; | u_int8_t cval[4]; | ||||
} tl; | } tl; | ||||
struct proc *p; | struct proc *p; | ||||
pid_t pid; | pid_t pid; | ||||
int ret = 0; | int i, ret = 0; | ||||
/* For the single open_owner of all 0 bytes, just return 0. */ | |||||
for (i = 0; i < NFSV4CL_LOCKNAMELEN; i++) | |||||
if (own[i] != 0) | |||||
break; | |||||
if (i == NFSV4CL_LOCKNAMELEN) | |||||
return (0); | |||||
tl.cval[0] = *own++; | tl.cval[0] = *own++; | ||||
tl.cval[1] = *own++; | tl.cval[1] = *own++; | ||||
tl.cval[2] = *own++; | tl.cval[2] = *own++; | ||||
tl.cval[3] = *own++; | tl.cval[3] = *own++; | ||||
pid = tl.lval; | pid = tl.lval; | ||||
p = pfind_locked(pid); | p = pfind_locked(pid); | ||||
if (p == NULL) | if (p == NULL) | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |