Skip to content

Commit

Permalink
libnvme: fixup error codes
Browse files Browse the repository at this point in the history
The error code is ENOTSUP, not NOTSUP.

Signed-off-by: Hannes Reinecke <[email protected]>
  • Loading branch information
hreinecke committed Nov 20, 2023
1 parent f284041 commit e407735
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nvme/linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static int derive_retained_key(int hmac, const char *hostnqn,
{
nvme_msg(NULL, LOG_ERR, "NVMe TLS is not supported; "
"recompile with OpenSSL support.\n");
errno = NOTSUP;
errno = ENOTSUP;
return -1;
}

Expand All @@ -561,7 +561,7 @@ static int gen_tls_identity(const char *hostnqn, const char *subsysnqn,
if (version != 0) {
nvme_msg(NULL, LOG_ERR, "NVMe TLS 2.0 is not supported; "
"recompile with OpenSSL support.\n");
errno = NOTSUP;
errno = ENOTSUP;
return -1;
}
sprintf(identity, "NVMe0R%02d %s %s",
Expand All @@ -575,7 +575,7 @@ static int derive_tls_key(int hmac, const char *identity,
{
nvme_msg(NULL, LOG_ERR, "NVMe TLS is not supported; "
"recompile with OpenSSL support.\n");
errno = NOTSUP;
errno = ENOTSUP;
return -1;
}
#else /* CONFIG_OPENSSL */
Expand Down

0 comments on commit e407735

Please sign in to comment.