|
@@ -331,6 +331,17 @@ static ssize_t commands_show(struct device *dev,
|
|
|
}
|
|
|
static DEVICE_ATTR_RO(commands);
|
|
|
|
|
|
+static ssize_t flags_show(struct device *dev,
|
|
|
+ struct device_attribute *attr, char *buf)
|
|
|
+{
|
|
|
+ struct nvdimm *nvdimm = to_nvdimm(dev);
|
|
|
+
|
|
|
+ return sprintf(buf, "%s%s\n",
|
|
|
+ test_bit(NDD_ALIASING, &nvdimm->flags) ? "alias " : "",
|
|
|
+ test_bit(NDD_LOCKED, &nvdimm->flags) ? "lock " : "");
|
|
|
+}
|
|
|
+static DEVICE_ATTR_RO(flags);
|
|
|
+
|
|
|
static ssize_t state_show(struct device *dev, struct device_attribute *attr,
|
|
|
char *buf)
|
|
|
{
|
|
@@ -372,6 +383,7 @@ static DEVICE_ATTR_RO(available_slots);
|
|
|
|
|
|
static struct attribute *nvdimm_attributes[] = {
|
|
|
&dev_attr_state.attr,
|
|
|
+ &dev_attr_flags.attr,
|
|
|
&dev_attr_commands.attr,
|
|
|
&dev_attr_available_slots.attr,
|
|
|
NULL,
|