afs: afs_osi_Read/Write returns negative on error

afs_osi_Read and afs_osi_Write need to return negative values on
error. EIO is not negative; return -EIO so we don't accidentally
return "success" if someone requested to read or write EIO bytes.

Reviewed-on: http://gerrit.openafs.org/6411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 456ee898ae77b201275363f4efc0098c28e195d5)

Change-Id: Idd2e6b85d27a914cac0169a6e8fdee49ff262dc0
Reviewed-on: http://gerrit.openafs.org/7937
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Andrew Deason 2011-12-22 14:50:09 -05:00 committed by Derrick Brashear
parent 0f0805fb4d
commit 6a48d79247
10 changed files with 12 additions and 12 deletions

View File

@ -164,7 +164,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -321,7 +321,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -170,7 +170,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -150,7 +150,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -144,7 +144,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -216,7 +216,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)
@ -251,7 +251,7 @@ afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("afs_osi_Write called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -200,7 +200,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)
@ -235,7 +235,7 @@ afs_osi_Write(struct osi_file *afile, afs_int32 offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("afs_osi_Write called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -142,7 +142,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr, afs_int32 asize)
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -146,7 +146,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr, afs_int32 asize)
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)

View File

@ -379,7 +379,7 @@ afs_osi_Read(struct osi_file *afile, int offset, void *aptr,
if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
return -EIO;
}
if (offset != -1)