]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
libnvme: fixup error codes
authorHannes Reinecke <hare@suse.de>
Mon, 20 Nov 2023 06:09:33 +0000 (07:09 +0100)
committerHannes Reinecke <hare@suse.de>
Mon, 20 Nov 2023 06:09:33 +0000 (07:09 +0100)
The error code is ENOTSUP, not NOTSUP.

Signed-off-by: Hannes Reinecke <hare@suse.de>
src/nvme/linux.c

index 19b1877d84090bdfb863bfddfc534092996cd8bb..7cb52d276244a2f69620b216fdb82fab8d4a1f3e 100644 (file)
@@ -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;
 }
 
@@ -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",
@@ -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 */