tools/testing/nvdimm: fix missing newline in nfit_test_dimm 'handle' attribute
authorDan Williams <dan.j.williams@intel.com>
Tue, 10 Apr 2018 21:23:47 +0000 (14:23 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 16 Apr 2018 15:18:51 +0000 (08:18 -0700)
Sysfs userspace tooling generally expects the kernel to emit a newlines
when reading sysfs attributes.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
tools/testing/nvdimm/test/nfit.c

index c8c8836..51fc41c 100644 (file)
@@ -1193,7 +1193,7 @@ static ssize_t handle_show(struct device *dev, struct device_attribute *attr,
        if (dimm < 0)
                return dimm;
 
-       return sprintf(buf, "%#x", handle[dimm]);
+       return sprintf(buf, "%#x\n", handle[dimm]);
 }
 DEVICE_ATTR_RO(handle);