]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Fix intel read stats log page
authorKeith Busch <keith.busch@intel.com>
Tue, 6 Dec 2016 16:34:15 +0000 (11:34 -0500)
committerKeith Busch <keith.busch@intel.com>
Tue, 6 Dec 2016 16:34:15 +0000 (11:34 -0500)
Need to use the parameter. Was mistakenly using the defined string,
which makes no sense.

Reported-by: Karsten Weiss <k.weiss@science-computing.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
intel-nvme.c

index a8a50414b0dbbbbce37a807229d37d1fff24e93b..1863e7bfb254ce4983aea8c3bbd3867c421ce998 100644 (file)
@@ -226,7 +226,7 @@ static int get_lat_stats_log(int argc, char **argv, struct command *cmd, struct
 
        fd = parse_and_open(argc, argv, desc, command_line_options, &cfg, sizeof(cfg));
 
-       err = nvme_get_log(fd, 0xffffffff, write ? 0xc2 : 0xc1, sizeof(stats), &stats);
+       err = nvme_get_log(fd, 0xffffffff, cfg.write ? 0xc2 : 0xc1, sizeof(stats), &stats);
        if (!err) {
                if (!cfg.raw_binary)
                        show_lat_stats(&stats, cfg.write);