]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: fix security send & receive commands show status code
authorGollu Appalanaidu <anaidu.gollu@samsung.com>
Sat, 27 Feb 2021 19:02:43 +0000 (00:32 +0530)
committerKeith Busch <kbusch@kernel.org>
Tue, 2 Mar 2021 19:37:50 +0000 (12:37 -0700)
Signed-off-by: Gollu Appalanaidu <anaidu.gollu@samsung.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index e9fd1fc8e2bbcdfa1fc051f016dd6b7822a5d4cb..131e42687f6d7af4e854364364216df27707df1f 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -3681,7 +3681,7 @@ static int sec_send(int argc, char **argv, struct command *cmd, struct plugin *p
        if (err < 0)
                perror("security-send");
        else if (err != 0)
-               fprintf(stderr, "NVME Security Send Command Error:%d\n", err);
+               nvme_show_status(err);
        else
                printf("NVME Security Send Command Success:%d\n", result);
 
@@ -5041,8 +5041,7 @@ static int sec_recv(int argc, char **argv, struct command *cmd, struct plugin *p
        if (err < 0)
                perror("security receive");
        else if (err != 0)
-               fprintf(stderr, "NVME Security Receive Command Error:%d\n",
-                                                                       err);
+               nvme_show_status(err);
        else {
                if (!cfg.raw_binary) {
                        printf("NVME Security Receive Command Success:%d\n",