static
struct storeOps rxfs_storeUfsOps = {
+#if (defined(AFS_SGI_ENV) && !defined(__c99))
+ rxfs_storeUfsPrepare,
+ rxfs_storeUfsRead,
+ rxfs_storeUfsWrite,
+ rxfs_storeStatus,
+ rxfs_storePadd,
+ rxfs_storeClose,
+ rxfs_storeDestroy,
+ afs_GenericStoreProc
+#else
.prepare = rxfs_storeUfsPrepare,
.read = rxfs_storeUfsRead,
.write = rxfs_storeUfsWrite,
.destroy = rxfs_storeDestroy,
#ifdef AFS_LINUX26_ENV
.storeproc = afs_linux_storeproc
+#else
+ .storeproc = afs_GenericStoreProc
+#endif
#endif
};
static
struct storeOps rxfs_storeMemOps = {
+#if (defined(AFS_SGI_ENV) && !defined(__c99))
+ rxfs_storeMemPrepare,
+ rxfs_storeMemRead,
+ rxfs_storeMemWrite,
+ rxfs_storeStatus,
+ rxfs_storePadd,
+ rxfs_storeClose,
+ rxfs_storeDestroy
+#else
.prepare = rxfs_storeMemPrepare,
.read = rxfs_storeMemRead,
.write = rxfs_storeMemWrite,
.padd = rxfs_storePadd,
.close = rxfs_storeClose,
.destroy = rxfs_storeDestroy
+#endif
};
afs_int32
#endif /* AFS_NOSTATS */
bytesXferred = 0;
- if (ops->storeproc)
- code = (*ops->storeproc)(ops, rock, tdc, shouldwake,
+ code = (*ops->storeproc)(ops, rock, tdc, shouldwake,
&bytesXferred);
- else
- code = afs_GenericStoreProc(ops, rock, tdc, shouldwake,
- &bytesXferred);
afs_Trace4(afs_iclSetp, CM_TRACE_STOREPROC, ICL_TYPE_POINTER, avc,
ICL_TYPE_FID, &(avc->f.fid), ICL_TYPE_OFFSET,
/* We need to cast here, in order to avoid issues if *alength is
* negative. Some, older, fileservers can return a negative length,
* which the rest of the code deals correctly with. */
- if (*alength > (afs_int32) size) {
+ if (code == 0 && *alength > (afs_int32) size) {
/* The fileserver told us it is going to send more data than we
* requested. It shouldn't do that, and accepting that much data
* can make us take up more cache space than we're supposed to,