goto retry_IO;
}
setuerror(code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
afs_warnuser
("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n");
setuerror(code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
code = asize - resid;
afile->offset += code;
} else {
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
code = asize - resid;
afile->offset += code;
} else {
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);
goto retry_IO;
}
setuerror(code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
afs_warnuser
("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n");
setuerror(code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
if (code == ENOSPC)
afs_warnuser
("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n");
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, auio.uio_resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
if (code == ENOSPC)
afs_warnuser
("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n");
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc)
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, auio.uio_resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
if (code == ENOSPC)
afs_warnuser
("\n\n\n*** Cache partition is FULL - Decrease cachesize!!! ***\n\n");
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc)
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
afile->offset += code;
if (afile->offset > afile->size)
afile->size = afile->offset;
- } else
- code = -1;
+ } else {
+ if (code > 0) {
+ code *= -1;
+ }
+ }
if (afile->proc)
(*afile->proc) (afile, code);
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32,
(unsigned int) resid, ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
afile->offset += code;
if (afile->offset > afile->size)
afile->size = afile->offset;
- } else
- code = -1;
+ } else {
+ if (code > 0) {
+ code *= -1;
+ }
+ }
if (afile->proc)
(*afile->proc) (afile, code);
} else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
return code;
}
code = asize - resid;
afile->offset += code;
} else {
- code = -1;
+ if (code > 0) {
+ code *= -1;
+ }
}
if (afile->proc) {
(*afile->proc) (afile, code);