]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
tools/testing/nvdimm: fix return code for unimplemented commands
authorDan Williams <dan.j.williams@intel.com>
Fri, 10 Jul 2015 17:06:12 +0000 (11:06 -0600)
committerDan Williams <dan.j.williams@intel.com>
Fri, 10 Jul 2015 17:50:50 +0000 (13:50 -0400)
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 <dan.j.williams@intel.com>
tools/testing/nvdimm/test/nfit.c

index 4b69b8368de01feb32b5521835efed0b8d372148..092d4724fe160d730eebffaee7d975f7eaf1bcb8 100644 (file)
@@ -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++)