]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
netapp-smdev: add err msg for no smdevices
authorMartin George <marting@netapp.com>
Sun, 27 Oct 2024 17:36:10 +0000 (23:06 +0530)
committerDaniel Wagner <wagi@monom.org>
Mon, 28 Oct 2024 10:39:11 +0000 (11:39 +0100)
Print an error message if no smdevices on the host.

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

index 9e95e5a87d686ad8c3d253d56cf396e4e599f17a..4c98700d20428b71126c24c5bc73f19c8ef7b5b1 100644 (file)
@@ -752,7 +752,8 @@ static int netapp_smdevices(int argc, char **argv, struct command *command,
                else if (fmt == NJSON)
                        netapp_smdevices_print_json(smdevices,
                                        num_smdevices, devname);
-       }
+       } else
+               fprintf(stderr, "No smdevices detected\n");
 
        for (i = 0; i < num; i++)
                free(devices[i]);