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

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

index 4c98700d20428b71126c24c5bc73f19c8ef7b5b1..5c2e3d4989b86523a02ed3e94d57ad69c344115c 100644 (file)
@@ -844,7 +844,8 @@ static int netapp_ontapdevices(int argc, char **argv, struct command *command,
                else if (fmt == NJSON)
                        netapp_ontapdevices_print_json(ontapdevices,
                                        num_ontapdevices, devname);
-       }
+       } else
+               fprintf(stderr, "No ontapdevices detected\n");
 
        for (i = 0; i < num; i++)
                free(devices[i]);