2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
15 #include <afsconfig.h>
16 #include "afs/param.h"
19 #include "afs/sysincludes.h" /* Standard vendor system headers */
20 #include "afsincludes.h" /* Afs-based standard headers */
21 #include <sys/namei.h>
24 osi_lookupname(char *aname, enum uio_seg seg, int followlink,
28 int flags, error, glocked;
31 glocked = ISAFS_GLOCK();
43 flags |= MPSAFE; /* namei must take GIANT if needed */
45 NDINIT(&n, LOOKUP, flags, seg, aname, curthread);
46 if ((error = namei(&n)) != 0) {
54 /* XXX should we do this? Usually NOT (matt) */
55 #if defined(AFS_FBSD80_ENV)
56 /*VOP_UNLOCK(n.ni_vp, 0);*/
58 VOP_UNLOCK(n.ni_vp, 0, curthread);
60 NDFREE(&n, NDF_ONLY_PNBUF);
69 * does not implement security features of kern_time.c:settime()
72 afs_osi_SetTime(osi_timeval_t * atv)
75 printf("afs attempted to set clock; use \"afsd -nosettime\"\n");
78 struct timeval tv, delta;
85 timevalsub(&delta, &tv);
86 ts.tv_sec = atv->tv_sec;
87 ts.tv_nsec = atv->tv_usec * 1000;
90 lease_updatetime(delta.tv_sec);
98 * Replace all of the bogus special-purpose memory allocators...
101 osi_fbsd_alloc(size_t size, int dropglobal)
104 #ifdef AFS_FBSD50_ENV
108 glocked = ISAFS_GLOCK();
111 rv = malloc(size, M_AFS, M_WAITOK);
116 rv = malloc(size, M_AFS, M_NOWAIT);
122 osi_fbsd_free(void *p)