I am writing Linux Kernel module, where I'm creating some sysfs files to store variables.
But I need to implement arrays, something like:
struct ats {
struct attribute attr;
unsigned long value[5];
};
struct ats m_ats = {
.attr.name="m_ats",
.attr.mode = 0644,
.value[0] = 0,
.value[1] = 0,
.value[2] = 0,
.value[3] = 0,
.value[4] = 0,
};
Is there a way to do that? How would be the show, store, module_init, module_exit functions?