mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
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:
parent
0f0805fb4d
commit
6a48d79247
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user