diff options
| author | Michael Brown | 2008-06-04 00:46:36 +0200 |
|---|---|---|
| committer | Michael Brown | 2008-06-04 00:47:20 +0200 |
| commit | 75965c9c6e9eca6d790710351f054689f4578a85 (patch) | |
| tree | 33131a0d6481b36fa1547014ea37d62da9e5010b /src/include | |
| parent | [Makefile] Remove obsolete SRCDIRS (diff) | |
| download | ipxe-75965c9c6e9eca6d790710351f054689f4578a85.tar.gz ipxe-75965c9c6e9eca6d790710351f054689f4578a85.tar.xz ipxe-75965c9c6e9eca6d790710351f054689f4578a85.zip | |
[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.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/iscsi.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/include/gpxe/iscsi.h b/src/include/gpxe/iscsi.h index e4df68494..5c446757b 100644 --- a/src/include/gpxe/iscsi.h +++ b/src/include/gpxe/iscsi.h @@ -224,10 +224,14 @@ struct iscsi_bhs_login_response { #define ISCSI_OPCODE_LOGIN_RESPONSE 0x23 /* Login response status codes */ -#define ISCSI_STATUS_SUCCESS 0x00 -#define ISCSI_STATUS_REDIRECT 0x01 -#define ISCSI_STATUS_INITIATOR_ERROR 0x02 -#define ISCSI_STATUS_TARGET_ERROR 0x03 +#define ISCSI_STATUS_SUCCESS 0x00 +#define ISCSI_STATUS_REDIRECT 0x01 +#define ISCSI_STATUS_INITIATOR_ERROR 0x02 +#define ISCSI_STATUS_INITIATOR_ERROR_AUTHENTICATION 0x01 +#define ISCSI_STATUS_INITIATOR_ERROR_AUTHORISATION 0x02 +#define ISCSI_STATUS_INITIATOR_ERROR_NOT_FOUND 0x03 +#define ISCSI_STATUS_INITIATOR_ERROR_REMOVED 0x04 +#define ISCSI_STATUS_TARGET_ERROR 0x03 /** * iSCSI SCSI command basic header segment |
