#if defined(AFS_NBSD50_ENV)
if ((fd = fd_getfile(SCARG(uap, fd))) == NULL)
return (EBADF);
-#elif defined(AFS_FBSD100_ENV)
+#elif defined(AFS_FBSD_ENV)
if ((uap->fd >= fdp->fd_nfiles)
|| ((fd = fdp->fd_ofiles[uap->fd].fde_file) == NULL))
return EBADF;
if (!ioctlDone) {
# if defined(AFS_FBSD_ENV)
-# if (__FreeBSD_version >= 900044)
return sys_ioctl(td, uap);
-# else
- return ioctl(td, uap);
-# endif
# elif defined(AFS_OBSD_ENV)
code = sys_ioctl(p, uap, retval);
# elif defined(AFS_NBSD_ENV)
#endif
}
#endif /* AFS_NEED_CLIENTCONTEXT */
- if ((com & 0xff) == 15) {
+
+ /* VIOCPREFETCH */
+ if ((com & 0xff00) >> 8 == 'V' && (com & 0xff) == 15) {
/* special case prefetch so entire pathname eval occurs in helper process.
* otherwise, the pioctl call is essentially useless */
#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
dput(dp);
AFS_GLOCK();
#else
-#if defined(AFS_FBSD80_ENV)
+#if defined(AFS_FBSD_ENV)
if (VOP_ISLOCKED(vp))
VOP_UNLOCK(vp, 0);
-#endif /* AFS_FBSD80_ENV */
+#endif /* AFS_FBSD_ENV */
AFS_RELE(vp); /* put vnode back */
#endif
}
tfid.Cell = avc->f.fid.Cell;
tfid.Fid.Volume = avc->f.fid.Fid.Volume;
if (!tfid.Fid.Unique && (avc->f.states & CForeign)) {
- tvc = afs_LookupVCache(&tfid, areq, NULL, avc, bufp);
+ tvc = afs_LookupVCache(&tfid, areq, avc, bufp);
} else {
- tvc = afs_GetVCache(&tfid, areq, NULL, NULL);
+ tvc = afs_GetVCache(&tfid, areq);
}
if (!tvc) {
code = EIO;
tfid.Cell = avc->f.fid.Cell;
tfid.Fid.Volume = avc->f.fid.Fid.Volume;
if (!tfid.Fid.Unique && (avc->f.states & CForeign)) {
- tvc = afs_LookupVCache(&tfid, areq, NULL, avc, bufp);
+ tvc = afs_LookupVCache(&tfid, areq, avc, bufp);
} else {
- tvc = afs_GetVCache(&tfid, areq, NULL, NULL);
+ tvc = afs_GetVCache(&tfid, areq);
}
if (!tvc) {
code = EIO;
#ifdef AFS_AIX_ENV
newcred->cr_ngrps = 2;
#elif !defined(AFS_LINUX26_ENV) && !defined(AFS_SUN510_ENV)
-# if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_FBSD80_ENV)
+# if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_FBSD_ENV)
newcred->cr_ngroups = 2;
# else
for (i = 2; i < NGROUPS; i++)
if (ainSize < sizeof(struct setspref))
return EINVAL;
-#if 0 /* num_servers is unsigned */
- if (sin->num_servers < 0)
- return EINVAL;
-#endif
if (sin->num_servers > AFS_MAX_INTERFACE_ADDR)
return ENOMEM;
tfid.Cell = avc->f.fid.Cell;
tfid.Fid.Volume = avc->f.fid.Fid.Volume;
if (!tfid.Fid.Unique && (avc->f.states & CForeign)) {
- tvc = afs_LookupVCache(&tfid, areq, NULL, avc, bufp);
+ tvc = afs_LookupVCache(&tfid, areq, avc, bufp);
} else {
- tvc = afs_GetVCache(&tfid, areq, NULL, NULL);
+ tvc = afs_GetVCache(&tfid, areq);
}
if (!tvc) {
code = EIO;
tfid.Fid.Vnode = Fid->Vnode;
tfid.Fid.Unique = Fid->Unique;
- tvc = afs_GetVCache(&tfid, areq, NULL, NULL);
+ tvc = afs_GetVCache(&tfid, areq);
if (!tvc) {
afs_Trace3(afs_iclSetp, CM_TRACE_PREFETCHCMD, ICL_TYPE_POINTER, tvc,
ICL_TYPE_FID, &tfid, ICL_TYPE_FID, &avc->f.fid);
tfid.Fid.Vnode = Fid->Vnode;
tfid.Fid.Unique = Fid->Unique;
- tvc = afs_GetVCache(&tfid, areq, NULL, NULL);
+ tvc = afs_GetVCache(&tfid, areq);
afs_Trace3(afs_iclSetp, CM_TRACE_RESIDCMD, ICL_TYPE_POINTER, tvc,
ICL_TYPE_INT32, Inputs->command, ICL_TYPE_FID, &tfid);
if (!tvc)
if (!afs_resourceinit_flag) /* afs deamons havn't started yet */
return EIO; /* Inappropriate ioctl for device */
- if (!afs_osi_suser(acred))
+ if (!afs_osi_suser(*acred))
return EACCES;
if (afs_pd_getInt(ain, &addr) != 0)
return EACCES;
}
afs_PutUser(tu, SHARED_LOCK);
- } else if (!afs_osi_suser(acred)) {
+ } else if (!afs_osi_suser(*acred)) {
return EACCES;
}