瀏覽代碼

tools/testing/nvdimm: fix return code for unimplemented commands

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>
Dan Williams 10 年之前
父節點
當前提交
f7ec83684a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/testing/nvdimm/test/nfit.c

+ 1 - 1
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++)