]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: print inserted tls key for check-tls-key
authorMartin George <marting@netapp.com>
Thu, 11 Jan 2024 10:06:46 +0000 (15:36 +0530)
committerDaniel Wagner <wagi@monom.org>
Thu, 18 Jan 2024 16:58:59 +0000 (17:58 +0100)
nvme check-tls-key currently misses out successfully printing
the inserted tls key, so print the same. And while we are it,
fix a small typo while printing the error message related to
the failure of generating the identity key.

Signed-off-by: Martin George <marting@netapp.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index 872dc89aee9e416c21959e673b4bf165aebad44e..25bf1c26f298ff76105a35cd9504da9d165a59a8 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -8767,6 +8767,7 @@ static int check_tls_key(int argc, char **argv, struct command *command, struct
                        nvme_show_error("Failed to insert key, error %d", errno);
                        return -errno;
                }
+               printf("Inserted TLS key %08x\n", (unsigned int)tls_key);
        } else {
                char *tls_id;
 
@@ -8774,7 +8775,7 @@ static int check_tls_key(int argc, char **argv, struct command *command, struct
                                        cfg.subsysnqn, cfg.identity,
                                        hmac, decoded_key, decoded_len);
                if (!tls_id) {
-                       nvme_show_error("Failed to generated identity, error %d",
+                       nvme_show_error("Failed to generate identity, error %d",
                                        errno);
                        return -errno;
                }