else if (strncmp("ufs", vp->v_mount->mnt_vfc->vfc_name, 3) == 0)
#endif
afs_CacheFSType = AFS_APPL_UFS_CACHE;
+#ifdef AFS_DARWIN80_ENV
+ else if (strncmp("apfs", buffer, 4) == 0)
+ afs_CacheFSType = AFS_APPL_APFS_CACHE;
+#endif
else
osi_Panic("Unknown cache vnode type\n");
#ifdef AFS_DARWIN80_ENV
#endif
afs_osicred_initialized = 1;
}
- afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
+ afile = osi_AllocSmallSpace(sizeof(struct osi_file));
AFS_GUNLOCK();
#ifdef AFS_CACHE_VNODE_PATH
if (!ainode->ufs) {
* down. No point in crashing when we are already shutting down
*/
if (!afile) {
- if (!afs_shuttingdown)
+ if (afs_shuttingdown == AFS_RUNNING)
osi_Panic("osi_Read called with null param");
else
- return EIO;
+ return -EIO;
}
if (offset != -1)
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code = -code;
+ }
}
return code;
}
code = asize - resid;
afile->offset += code;
} else {
- code = -1;
+ if (code > 0) {
+ code = -code;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);