X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafs%2FOBSD%2Fosi_file.c;h=72a43ef9fa335e1496ebe22c2f1cb8daebb8109c;hp=e9921988ce52b8e764e7ab34e5493f2fc53f7a8c;hb=b5ca12ac4696c4049be14974f1e946bb55e1c440;hpb=456ee898ae77b201275363f4efc0098c28e195d5 diff --git a/src/afs/OBSD/osi_file.c b/src/afs/OBSD/osi_file.c index e992198..72a43ef 100644 --- a/src/afs/OBSD/osi_file.c +++ b/src/afs/OBSD/osi_file.c @@ -163,7 +163,9 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr, afs_int32 asize) } 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; } @@ -195,8 +197,11 @@ afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr, 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);