From 744212766fed382ede385a0b62b49a9b10fadcfc Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Tue, 15 Jul 2003 20:49:30 +0000 Subject: [PATCH] freebsd-5x-20030715 use curproc->p_pid instead of getpid() (conflicts with kernel getpid) pass correct number of args to afs_close --- src/afs/FBSD/osi_vnodeops.c | 4 ++-- src/util/uuid.c | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/afs/FBSD/osi_vnodeops.c b/src/afs/FBSD/osi_vnodeops.c index a2bbedd58..737f2cc96 100644 --- a/src/afs/FBSD/osi_vnodeops.c +++ b/src/afs/FBSD/osi_vnodeops.c @@ -315,9 +315,9 @@ afs_vop_close(ap) struct vcache *avc = VTOAFS(ap->a_vp); AFS_GLOCK(); if (ap->a_cred) - code = afs_close(avc, ap->a_fflag, ap->a_cred, ap->a_p); + code = afs_close(avc, ap->a_fflag, ap->a_cred); else - code = afs_close(avc, ap->a_fflag, &afs_osi_cred, ap->a_p); + code = afs_close(avc, ap->a_fflag, &afs_osi_cred); afs_BozonLock(&avc->pvnLock, avc); osi_FlushPages(avc, ap->a_cred); /* hold bozon lock, but not basic vnode lock */ afs_BozonUnlock(&avc->pvnLock, avc); diff --git a/src/util/uuid.c b/src/util/uuid.c index 8ecab1078..a6a1b0518 100644 --- a/src/util/uuid.c +++ b/src/util/uuid.c @@ -270,7 +270,11 @@ afs_int32 afs_uuid_create (afsUUID *uuid) seed ^= *seedp++; seed ^= *seedp++; seed ^= *seedp++; - rand_irand += seed + (afs_uint32)getpid(); +#if defined(KERNEL) && defined(AFS_XBSD_ENV) + rand_irand += seed + (afs_uint32) curproc->p_pid; +#else + rand_irand += seed + (afs_uint32) getpid(); +#endif uuid__get_os_time (&time_last); clock_seq = true_random(); #ifdef AFS_NT40_ENV -- 2.39.5