mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 12:30:20 +03:00
[iSCSI] Produce meaningful errors on login failure
Return the most appropriate of EACCES, EPERM, ENODEV, ENOTSUP, EIO or EINVAL depending on the exact error returned by the target, rather than just always returning EPERM. Also, ensure that error strings exist for these errors.
This commit is contained in:
@@ -108,15 +108,18 @@ const char * strerror ( int errno ) {
|
||||
/** The most common errors */
|
||||
struct errortab common_errors[] __errortab = {
|
||||
{ 0, "No error" },
|
||||
{ ENOMEM, "Out of memory" },
|
||||
{ EINVAL, "Invalid argument" },
|
||||
{ ENOSPC, "No space left on device" },
|
||||
{ EIO, "Input/output error" },
|
||||
{ EACCES, "Permission denied" },
|
||||
{ ENOENT, "File not found" },
|
||||
{ ENETUNREACH, "Network unreachable" },
|
||||
{ ETIMEDOUT, "Connection timed out" },
|
||||
{ EPIPE, "Broken pipe" },
|
||||
{ ECANCELED, "Operation cancelled" },
|
||||
{ ECONNRESET, "Connection reset" },
|
||||
{ EINVAL, "Invalid argument" },
|
||||
{ EIO, "Input/output error" },
|
||||
{ ENETUNREACH, "Network unreachable" },
|
||||
{ ENODEV, "No such device" },
|
||||
{ ENOENT, "File not found" },
|
||||
{ ENOEXEC, "Not an executable image" },
|
||||
{ ENOMEM, "Out of memory" },
|
||||
{ ENOSPC, "No space left on device" },
|
||||
{ ENOTSUP, "Not supported" },
|
||||
{ EPERM, "Operation not permitted" },
|
||||
{ ETIMEDOUT, "Connection timed out" },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user