From 12943ff9cf26117899dce5048e91a0f6732becc7 Mon Sep 17 00:00:00 2001 From: Markus Kurz Date: Sat, 1 Nov 2025 14:09:04 +0100 Subject: [PATCH] fix: zns: add error check zns report zones This commit adds the additional check for an error. Signed-off-by: Markus Kurz --- 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 0b753b00f4..73450adb7b 100644 --- a/plugins/zns/zns.c +++ b/plugins/zns/zns.c @@ -915,8 +915,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,