The kernel might return ECONNECTREFUSED when opening of a socket fails.
Add this missing errno to enum nvme_connect_err.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
case EOPNOTSUPP:
ret = -ENVME_CONNECT_OPNOTSUPP;
break;
+ case ECONNREFUSED :
+ ret = -ENVME_CONNECT_CONNREFUSED;
+ break;
default:
ret = -ENVME_CONNECT_WRITE;
break;
[ENVME_CONNECT_ADDRINUSE] = "hostnqn already in use",
[ENVME_CONNECT_NODEV] = "invalid interface",
[ENVME_CONNECT_OPNOTSUPP] ="not supported",
+ [ENVME_CONNECT_CONNREFUSED] = "connection refused",
};
const char *nvme_errno_to_string(int status)
* @ENVME_CONNECT_ADDRINUSE: hostnqn already in use
* @ENVME_CONNECT_NODEV: invalid interface
* @ENVME_CONNECT_OPNOTSUPP: not supported
+ * @ENVME_CONNECT_CONNREFUSED: connection refused
*/
enum nvme_connect_err {
ENVME_CONNECT_RESOLVE = 1000,
ENVME_CONNECT_ADDRINUSE,
ENVME_CONNECT_NODEV,
ENVME_CONNECT_OPNOTSUPP,
+ ENVME_CONNECT_CONNREFUSED,
};
/**