From: Dan Williams Date: Fri, 10 Jul 2015 17:06:12 +0000 (-0600) Subject: tools/testing/nvdimm: fix return code for unimplemented commands X-Git-Tag: v4.1.12-92~18^2^2~161 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=718a15c97c28c40bbfcd0f8a85f41d771edd0ada;p=users%2Fjedix%2Flinux-maple.git tools/testing/nvdimm: fix return code for unimplemented commands Orabug: 22913653 The implementation for the new "DIMM Flags" DSM relies on the -ENOTTY return code to indicate that the flags are unimplimented and to fall back to a safe default. As is the -ENXIO error code erroneoously indicates to fail enabling a BLK region. Signed-off-by: Dan Williams (cherry picked from commit f7ec83684af020c961d7fab801f8e3ef7ce5de33) Signed-off-by: Dan Duval --- diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c index 4b69b8368de01..092d4724fe160 100644 --- a/tools/testing/nvdimm/test/nfit.c +++ b/tools/testing/nvdimm/test/nfit.c @@ -155,7 +155,7 @@ static int nfit_test_ctl(struct nvdimm_bus_descriptor *nd_desc, int i, rc; if (!nfit_mem || !test_bit(cmd, &nfit_mem->dsm_mask)) - return -ENXIO; + return -ENOTTY; /* lookup label space for the given dimm */ for (i = 0; i < ARRAY_SIZE(handle); i++)