afs_int32
rxfs_storeUfsRead(void *r, struct osi_file *tfile, afs_uint32 offset,
- afs_uint32 tlen, afs_uint32 *got)
+ afs_uint32 tlen, afs_uint32 *bytesread)
{
+ afs_int32 code;
struct rxfs_storeVariables *v = (struct rxfs_storeVariables *)r;
- *got = afs_osi_Read(tfile, -1, v->tbuffer, tlen);
- if ((*got < 0)
+ *bytesread = 0;
+ code = afs_osi_Read(tfile, -1, v->tbuffer, tlen);
+ if (code < 0)
+ return EIO;
+ *bytesread = code;
+ if (code == tlen)
+ return 0;
#if defined(KERNEL_HAVE_UERROR)
- || (*got != tlen && getuerror())
-#endif
- )
+ if (getuerror())
return EIO;
+#endif
return 0;
}
RX_MAXIOVECS);
if (!tiov) {
osi_Panic
- ("afs_MemCacheFetchProc: osi_AllocSmallSpace for iovecs returned NULL\n");
+ ("afs_MemCacheFetchProc: osi_AllocSmallSpace returned NULL\n");
}
adc->validPos = abase;
do {