mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user