23 #include <linux/device.h>
39 return a->
show ? a->
show(edp, buf) : 0;
43 const char *
buf,
size_t len)
48 return a->
store ? a->
store(edp, buf, len) : len;
51 static const struct sysfs_ops odev_attr_ops = {
52 .show = odev_attr_show,
53 .store = odev_attr_store,
57 static struct kset *exofs_kset;
94 #define OSD_ATTR(name, mode, show, store) \
95 static struct odev_attr odev_attr_##name = \
96 __ATTR(name, mode, show, store)
102 static struct attribute *odev_attrs[] = {
103 &odev_attr_osdname.attr,
104 &odev_attr_systemid.attr,
110 .default_attrs = odev_attrs,
111 .sysfs_ops = &odev_attr_ops,
119 #ifdef CONFIG_EXOFS_DEBUG
120 struct kobject *k_name, *k_tmp;
124 __func__, kobject_name(k_name),
136 struct kobject *k_name, *k_tmp;
141 if (k_name->
parent == s_kobj)
161 s_kobj->
kset = exofs_kset;
163 &exofs_kset->
kobj,
"%s_%llx", dt_dev->
osdname, pid);
165 EXOFS_ERR(
"ERROR: Failed to create sysfs entry for "
166 "uuid-%s_%llx => %d\n", dt_dev->
osdname, pid, retval);
181 d_kobj->
kset = exofs_kset;
185 EXOFS_ERR(
"ERROR: Failed to create sysfs entry for "
186 "device dev%u\n", edev->
did);
196 EXOFS_ERR(
"ERROR: kset_create_and_add exofs failed\n");