int ioctlDone = 0, code = 0;
AFS_STATCNT(afs_xioctl);
-# if defined(AFS_SUN57_ENV)
fd = getf(uap->fd);
if (!fd)
return (EBADF);
-# elif defined(AFS_SUN54_ENV)
- fd = GETF(uap->fd);
- if (!fd)
- return (EBADF);
-# else
- if (code = getf(uap->fd, &fd)) {
- return (code);
- }
-# endif
if (fd->f_vnode->v_type == VREG || fd->f_vnode->v_type == VDIR) {
tvc = VTOAFS(fd->f_vnode); /* valid, given a vnode */
if (tvc && IsAfsVnode(AFSTOV(tvc))) {
if (code) {
osi_FreeSmallSpace(datap);
AFS_GUNLOCK();
-# if defined(AFS_SUN54_ENV)
releasef(uap->fd);
-# else
- releasef(fd);
-# endif
return (EFAULT);
}
code = HandleIoctl(tvc, uap->com, datap);
}
}
}
-# if defined(AFS_SUN57_ENV)
releasef(uap->fd);
-# elif defined(AFS_SUN54_ENV)
- RELEASEF(uap->fd);
-# else
- releasef(fd);
-# endif
if (!ioctlDone)
code = ioctl(uap, rvp);
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)
{
char *tp;
afs_int32 code;
-#if defined(AFS_SGI61_ENV) || defined(AFS_SUN57_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#if defined(AFS_SGI61_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
size_t bufferSize;
#else
u_int bufferSize;
afs_uint32 temp = sp->host.s_addr;
srvr =
afs_GetServer(&temp, 1, 0, (vlonly ? AFS_VLPORT : AFS_FSPORT),
- WRITE_LOCK, (afsUUID *) 0, 0);
+ WRITE_LOCK, (afsUUID *) 0, 0, NULL);
srvr->addr->sa_iprank = sp->rank + afs_randomMod15();
afs_PutServer(srvr, WRITE_LOCK);
}
ssp = (struct setspref *)ainPtr;
if (ainSize < (sizeof(struct setspref)
- + sizeof(struct spref) * ssp->num_servers-1))
+ + sizeof(struct spref) * (ssp->num_servers-1)))
return EINVAL;
afs_setsprefs(&(ssp->servers[0]), ssp->num_servers,
DECL_PIOCTL(PPrefetchFromTape)
{
- afs_int32 code, code1;
- afs_int32 bytes, outval;
+ afs_int32 code;
+ afs_int32 outval;
struct afs_conn *tc;
struct rx_call *tcall;
struct AFSVolSync tsync;
struct vcache *tvc;
struct rx_connection *rxconn;
- AFS_STATCNT(PSetAcl);
+ AFS_STATCNT(PPrefetchFromTape);
if (!avc)
return EINVAL;
StartRXAFS_FetchData(tcall, (struct AFSFid *)&tvc->f.fid.Fid, 0,
0);
if (!code) {
- bytes = rx_Read(tcall, (char *)&outval, sizeof(afs_int32));
+ rx_Read(tcall, (char *)&outval, sizeof(afs_int32));
code =
EndRXAFS_FetchData(tcall, &OutStatus, &CallBack, &tsync);
}
- code1 = rx_EndCall(tcall, code);
+ code = rx_EndCall(tcall, code);
RX_AFS_GLOCK();
} else
code = -1;
DECL_PIOCTL(PGetTokens2)
{
- struct cell *cell;
+ struct cell *cell = NULL;
struct unixuser *tu = NULL;
afs_int32 iterator;
char *cellName = NULL;