afs: Avoid -1 error for vreadUIO/vwriteUIO 31/13931/2
authorAndrew Deason <adeason@sinenomine.net>
Tue, 5 Nov 2019 02:03:43 +0000 (20:03 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 8 Nov 2019 07:56:41 +0000 (02:56 -0500)
commit360b9d5d71fb1de142ae4efd4660732476855a3f
treeaca4dd0018a211b441b85317fa9670898685319d
parentb3b56d79653566ef1442d296e31beb762d25ce42
afs: Avoid -1 error for vreadUIO/vwriteUIO

Commit c6b61a45 (afs: Verify osi_UFSOpen worked) added various checks
to return an error if a given osi_UFSOpen failed. However, two of
these checks (in afs_UFSReadUIO and afs_UFSWriteUIO) result in us
returning -1 on error, in functions that otherwise return errno codes
(e.g. ENOSPC). An error code of -1 might get interpreted as
RX_CALL_DEAD, which would be rather confusing, so use EIO as a generic
error instead.

Change-Id: I23b9a73b82d999d8ee4670b5e7ec39b9d820fb0f
Reviewed-on: https://gerrit.openafs.org/13931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/VNOPS/afs_vnop_read.c
src/afs/VNOPS/afs_vnop_write.c