freebsd-5x-20030715
authorJim Rees <rees@umich.edu>
Tue, 15 Jul 2003 20:49:30 +0000 (20:49 +0000)
committerJim Rees <rees@umich.edu>
Tue, 15 Jul 2003 20:49:30 +0000 (20:49 +0000)
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
src/util/uuid.c

index a2bbedd..737f2cc 100644 (file)
@@ -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);
index 8ecab10..a6a1b05 100644 (file)
@@ -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