/* Returns module and fills in value, defined and namebuf, or NULL if
symnum out of range. */
struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
- char *type, char *name, size_t namelen);
+ char *type, char *name);
/* Look for this name: can be of form module:name. */
unsigned long module_kallsyms_lookup_name(const char *name);
static inline struct module *module_get_kallsym(unsigned int symnum,
unsigned long *value,
- char *type, char *name,
- size_t namelen)
+ char *type, char *name)
{
return NULL;
}
{
iter->owner = module_get_kallsym(iter->pos - kallsyms_num_syms,
&iter->value, &iter->type,
- iter->name, sizeof(iter->name));
+ iter->name);
if (iter->owner == NULL)
return 0;
#include <linux/module.h>
#include <linux/moduleloader.h>
#include <linux/init.h>
+#include <linux/kallsyms.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
}
struct module *module_get_kallsym(unsigned int symnum, unsigned long *value,
- char *type, char *name, size_t namelen)
+ char *type, char *name)
{
struct module *mod;
*value = mod->symtab[symnum].st_value;
*type = mod->symtab[symnum].st_info;
strlcpy(name, mod->strtab + mod->symtab[symnum].st_name,
- namelen);
+ KSYM_NAME_LEN + 1);
mutex_unlock(&module_mutex);
return mod;
}