Blame include/iscsi_err.h

Packit eace71
/*
Packit eace71
 * Return codes used by iSCSI tools.
Packit eace71
 */
Packit eace71
#ifndef _ISCSI_ERR_
Packit eace71
#define _ISCSI_ERR_
Packit eace71
Packit eace71
enum {
Packit eace71
	ISCSI_SUCCESS			= 0,
Packit eace71
	/* Generic error */
Packit eace71
	ISCSI_ERR			= 1,
Packit eace71
	/* session could not be found */
Packit eace71
	ISCSI_ERR_SESS_NOT_FOUND	= 2,
Packit eace71
	/* Could not allocate resource for operation */
Packit eace71
	ISCSI_ERR_NOMEM			= 3,
Packit eace71
	/* Transport error caused operation to fail */
Packit eace71
	ISCSI_ERR_TRANS			= 4,
Packit eace71
	/* Generic login failure */
Packit eace71
	ISCSI_ERR_LOGIN			= 5,
Packit eace71
	/* Error accessing/managing iSCSI DB */
Packit eace71
	ISCSI_ERR_IDBM			= 6,
Packit eace71
	/* Invalid argument */
Packit eace71
	ISCSI_ERR_INVAL			= 7,
Packit eace71
	/* Connection timer exired while trying to connect */
Packit eace71
	ISCSI_ERR_TRANS_TIMEOUT		= 8,
Packit eace71
	/* Generic internal iscsid failure */
Packit eace71
	ISCSI_ERR_INTERNAL		= 9,
Packit eace71
	/* Logout failed */
Packit eace71
	ISCSI_ERR_LOGOUT		= 10,
Packit eace71
	/* iSCSI PDU timedout */
Packit eace71
	ISCSI_ERR_PDU_TIMEOUT		= 11,
Packit eace71
	/* iSCSI transport module not loaded in kernel or iscsid */
Packit eace71
	ISCSI_ERR_TRANS_NOT_FOUND	= 12,
Packit eace71
	/* Permission denied */
Packit eace71
	ISCSI_ERR_ACCESS		= 13,
Packit eace71
	/* Transport module did not support operation */
Packit eace71
	ISCSI_ERR_TRANS_CAPS		= 14,
Packit eace71
	/* Session is logged in */
Packit eace71
	ISCSI_ERR_SESS_EXISTS		= 15,
Packit eace71
	/* Invalid IPC MGMT request */
Packit eace71
	ISCSI_ERR_INVALID_MGMT_REQ	= 16,
Packit eace71
	/* iSNS service is not supported */
Packit eace71
	ISCSI_ERR_ISNS_UNAVAILABLE	= 17,
Packit eace71
	/* A read/write to iscsid failed */
Packit eace71
	ISCSI_ERR_ISCSID_COMM_ERR	= 18,
Packit eace71
	/* Fatal login error */
Packit eace71
	ISCSI_ERR_FATAL_LOGIN		= 19,
Packit eace71
	/* Could ont connect to iscsid */
Packit eace71
	ISCSI_ERR_ISCSID_NOTCONN	= 20,
Packit eace71
	/* No records/targets/sessions/portals found to execute operation on */
Packit eace71
	ISCSI_ERR_NO_OBJS_FOUND		= 21,
Packit eace71
	/* Could not lookup object in sysfs */
Packit eace71
	ISCSI_ERR_SYSFS_LOOKUP		= 22,
Packit eace71
	/* Could not lookup host */
Packit eace71
	ISCSI_ERR_HOST_NOT_FOUND	= 23,
Packit eace71
	/* Login failed due to authorization failure */
Packit eace71
	ISCSI_ERR_LOGIN_AUTH_FAILED	= 24,
Packit eace71
	/* iSNS query failure */
Packit eace71
	ISCSI_ERR_ISNS_QUERY		= 25,
Packit eace71
	/* iSNS registration/deregistration failed */
Packit eace71
	ISCSI_ERR_ISNS_REG_FAILED	= 26,
Packit eace71
	/* operation not supported */
Packit eace71
	ISCSI_ERR_OP_NOT_SUPP		= 27,
Packit eace71
	/* device or resource in use */
Packit eace71
	ISCSI_ERR_BUSY			= 28,
Packit eace71
	/* Operation failed, but retrying layer may succeed */
Packit eace71
	ISCSI_ERR_AGAIN			= 29,
Packit eace71
	/* unknown discovery type */
Packit eace71
	ISCSI_ERR_UNKNOWN_DISCOVERY_TYPE = 30,
Packit eace71
	/* child process terminated */
Packit eace71
	ISCSI_ERR_CHILD_TERMINATED	= 31,
Packit eace71
	/* session likely not connected */
Packit eace71
	ISCSI_ERR_SESSION_NOT_CONNECTED = 32,
Packit eace71
Packit eace71
	/* Always last. Indicates end of error code space */
Packit eace71
	ISCSI_MAX_ERR_VAL,
Packit eace71
} iscsi_err;
Packit eace71
Packit eace71
extern void iscsi_err_print_msg(int err);
Packit eace71
extern char *iscsi_err_to_str(int err);
Packit eace71
Packit eace71
#endif