From: Keith Busch Date: Tue, 6 Dec 2016 16:34:15 +0000 (-0500) Subject: Fix intel read stats log page X-Git-Tag: v1.1~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6833ca88af0b5af459509bd6d10190428ab7c451;p=users%2Fsagi%2Fnvme-cli.git Fix intel read stats log page Need to use the parameter. Was mistakenly using the defined string, which makes no sense. Reported-by: Karsten Weiss Signed-off-by: Keith Busch --- diff --git a/intel-nvme.c b/intel-nvme.c index a8a50414..1863e7bf 100644 --- a/intel-nvme.c +++ b/intel-nvme.c @@ -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);