[PATCH] /sys/modules: allow full length section names

I've been using systemtap for some debugging and I noticed that it can't
probe a lot of modules.  Turns out it's kind of silly, the sections section
of /sys/module is limited to 32byte filenames and many of the actual
sections are a a bit longer than that.

[akpm@osdl.org: rewrite to use dymanic allocation]
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Ian S. Nelson 2006-09-29 02:01:31 -07:00 committed by Linus Torvalds
parent 3b5e0cbb4f
commit 04b1db9fd7
3 changed files with 24 additions and 9 deletions

View file

@ -232,17 +232,17 @@ enum module_state
};
/* Similar stuff for section attributes. */
#define MODULE_SECT_NAME_LEN 32
struct module_sect_attr
{
struct module_attribute mattr;
char name[MODULE_SECT_NAME_LEN];
char *name;
unsigned long address;
};
struct module_sect_attrs
{
struct attribute_group grp;
int nsections;
struct module_sect_attr attrs[0];
};