When libnvme ignores a connection attempt via the 'application' context
tracking return an unique error code to allow proper filtering on the
caller side.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
if (!app || strcmp(app, root_app)) {
nvme_msg(h->r, LOG_INFO, "skip %s, not managed by %s\n",
nvme_subsystem_get_nqn(s), root_app);
- errno = ENVME_CONNECT_INVAL;
+ errno = ENVME_CONNECT_IGNORED;
return -1;
}
}
* @ENVME_CONNECT_OPNOTSUPP: not supported
* @ENVME_CONNECT_CONNREFUSED: connection refused
* @ENVME_CONNECT_ADDRNOTAVAIL: cannot assign requested address
+ * @ENVME_CONNECT_IGNORED: connect attempt is ignored due to configuration
*/
enum nvme_connect_err {
ENVME_CONNECT_RESOLVE = 1000,
ENVME_CONNECT_OPNOTSUPP,
ENVME_CONNECT_CONNREFUSED,
ENVME_CONNECT_ADDRNOTAVAIL,
+ ENVME_CONNECT_IGNORED,
};
/**