22 #include <linux/module.h>
23 #include <linux/kernel.h>
26 #include <linux/string.h>
27 #include <asm/uaccess.h>
55 }
else if (!
strnicmp(buf,
"deny", 4)) {
58 }
else if (!
strnicmp(buf,
"off", 3)) {
72 #define to_mlog_attr(_attr) container_of(_attr, struct mlog_attribute, attr)
74 #define define_mask(_name) { \
77 .mode = S_IRUGO | S_IWUSR, \
112 return mlog_mask_show(mlog_attr->
mask, buf);
116 const char *buf,
size_t count)
120 return mlog_mask_store(mlog_attr->
mask, buf, count);
123 static const struct sysfs_ops mlog_attr_ops = {
129 .default_attrs = mlog_attr_ptrs,
130 .sysfs_ops = &mlog_attr_ops,
133 static struct kset mlog_kset = {
134 .kobj = {.ktype = &mlog_ktype},
141 while (mlog_attrs[i].
attr.mode) {
142 mlog_attr_ptrs[
i] = &mlog_attrs[
i].
attr;
145 mlog_attr_ptrs[
i] =
NULL;
148 mlog_kset.
kobj.kset = o2cb_kset;