From 04fc4d3b152aa2079b6a80994a2634a202e8b88f Mon Sep 17 00:00:00 2001 From: Markus Kurz Date: Sat, 1 Nov 2025 14:09:04 +0100 Subject: [PATCH] zns: add error check zns report zones This commit adds the additional check for an error. Signed-off-by: Markus Kurz Signed-off-by: Daniel Wagner --- plugins/zns/zns.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/zns/zns.c b/plugins/zns/zns.c index 47656e556f..e2848ffd5f 100644 --- a/plugins/zns/zns.c +++ b/plugins/zns/zns.c @@ -927,8 +927,10 @@ static int report_zones(int argc, char **argv, struct command *acmd, struct plug if (err > 0) { nvme_show_status(err); break; + } else if (err < 0) { + perror("zns report-zones"); + break; } - // QUESTION: should we also check for < 0 here? if (!err) nvme_show_zns_report_zones(report, nr_zones_chunks,