From df4b12b68095b376dd54ef9ed0eb71c03048c3ff Mon Sep 17 00:00:00 2001 From: Martin George Date: Sun, 27 Oct 2024 23:10:19 +0530 Subject: [PATCH] netapp-ontapdev: add err msg for no ontapdevices Print an error message if no ontapdevices on the host. Signed-off-by: Martin George --- plugins/netapp/netapp-nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c index 4c98700d..5c2e3d49 100644 --- a/plugins/netapp/netapp-nvme.c +++ b/plugins/netapp/netapp-nvme.c @@ -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]); -- 2.50.1