Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77926
b: refs/heads/master
c: 8686c99
h: refs/heads/master
v: v3
  • Loading branch information
Denis Cheng authored and Rusty Russell committed Jan 29, 2008
1 parent 81e04f8 commit 480d794
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6dd06c9fbe025f542bce4cdb91790c0f91962722
refs/heads/master: 8686c99875f3849047660a5b6d02438443f22ce7
8 changes: 3 additions & 5 deletions trunk/kernel/params.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ int param_get_string(char *buffer, struct kernel_param *kp)

extern struct kernel_param __start___param[], __stop___param[];

#define MAX_KBUILD_MODNAME KOBJ_NAME_LEN

struct param_attribute
{
struct module_attribute mattr;
Expand Down Expand Up @@ -587,20 +585,20 @@ static void __init param_sysfs_builtin(void)
{
struct kernel_param *kp, *kp_begin = NULL;
unsigned int i, name_len, count = 0;
char modname[MAX_KBUILD_MODNAME + 1] = "";
char modname[MODULE_NAME_LEN + 1] = "";

for (i=0; i < __stop___param - __start___param; i++) {
char *dot;
size_t max_name_len;

kp = &__start___param[i];
max_name_len =
min_t(size_t, MAX_KBUILD_MODNAME, strlen(kp->name));
min_t(size_t, MODULE_NAME_LEN, strlen(kp->name));

dot = memchr(kp->name, '.', max_name_len);
if (!dot) {
DEBUGP("couldn't find period in first %d characters "
"of %s\n", MAX_KBUILD_MODNAME, kp->name);
"of %s\n", MODULE_NAME_LEN, kp->name);
continue;
}
name_len = dot - kp->name;
Expand Down

0 comments on commit 480d794

Please sign in to comment.