Skip to content

Commit 8f45360

Browse files
kurz-migaw
authored andcommitted
zns: add error check zns report zones
This commit adds the additional check for an error. Signed-off-by: Markus Kurz <[email protected]> Signed-off-by: Daniel Wagner <[email protected]>
1 parent 7daa1e9 commit 8f45360

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/zns/zns.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,10 @@ static int report_zones(int argc, char **argv, struct command *acmd, struct plug
927927
if (err > 0) {
928928
nvme_show_status(err);
929929
break;
930+
} else if (err < 0) {
931+
perror("zns report-zones");
932+
break;
930933
}
931-
// QUESTION: should we also check for < 0 here?
932934

933935
if (!err)
934936
nvme_show_zns_report_zones(report, nr_zones_chunks,

0 commit comments

Comments
 (0)