]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
plugins/sfx: fix an error message in scaleflux plugin
authorMaurizio Lombardi <mlombard@redhat.com>
Tue, 8 Nov 2022 14:19:35 +0000 (15:19 +0100)
committerDaniel Wagner <dwagner@suse.de>
Wed, 9 Nov 2022 09:35:30 +0000 (10:35 +0100)
"write" is a const string which cannot be null, we should check
cfg.write instead

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
plugins/scaleflux/sfx-nvme.c

index a776664d8478eaa75d1fd6434a33188aae0ff47e..4bcfbf6abd9ac39f4d55b85782909c565b34f9d1 100644 (file)
@@ -659,7 +659,7 @@ static int get_lat_stats_log(int argc, char **argv, struct command *cmd, struct
                        }
                } else {
                        printf("ScaleFlux IO %s Command Latency Statistics Invalid Version Maj %d Min %d\n",
-                                   write ? "Write" : "Read", stats.ver.maj, stats.ver.min);
+                                   cfg.write ? "Write" : "Read", stats.ver.maj, stats.ver.min);
                }
        } else if (err > 0)
                nvme_show_status(err);