From: Keith Busch Date: Thu, 3 Mar 2016 14:32:18 +0000 (-0700) Subject: Fixing a get and set features X-Git-Tag: v0.5~17 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ebb972b2b67e5e782b73edba574f665ef47dab2d;p=users%2Fsagi%2Fnvme-cli.git Fixing a get and set features The get feature argument for extensive decoding for readibility is 'H' rather than 'h', and a set feature value can be 0xffffffff, so fixing that bogus check. Signed-off-by: Keith Busch --- diff --git a/nvme.c b/nvme.c index 8876c739..fd2187a6 100644 --- a/nvme.c +++ b/nvme.c @@ -1026,7 +1026,7 @@ static int get_feature(int argc, char **argv) {"data-len", 'l', "NUM", CFG_POSITIVE, &cfg.data_len, required_argument, data_len}, {"raw-binary", 'b', "FLAG",CFG_NONE, &cfg.raw_binary, no_argument, raw_binary}, {"cdw11", 'c', "NUM", CFG_POSITIVE, &cfg.cdw11, required_argument, cdw11}, - {"human-readable", 'h', "FLAG",CFG_NONE, &cfg.human_readable, no_argument, human_readable}, + {"human-readable", 'H', "FLAG",CFG_NONE, &cfg.human_readable, no_argument, human_readable}, {0} }; @@ -1404,10 +1404,6 @@ static int set_feature(int argc, char **argv) get_dev(1, argc, argv); - if (cfg.value == -1) { - fprintf(stderr, "feature value required param\n"); - return EINVAL; - } if (!cfg.feature_id) { fprintf(stderr, "feature-id required param\n"); return EINVAL;