git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NFS: nfs_lookup doesn't need to revalidate the parent directory's inode
[safe/jmp/linux-2.6]
/
kernel
/
params.c
diff --git
a/kernel/params.c
b/kernel/params.c
index
5538608
..
1a8614b
100644
(file)
--- a/
kernel/params.c
+++ b/
kernel/params.c
@@
-80,8
+80,6
@@
static char *next_arg(char *args, char **param, char **val)
int in_quote = 0, quoted = 0;
char *next;
int in_quote = 0, quoted = 0;
char *next;
- /* Chew any extra spaces */
- while (*args == ' ') args++;
if (*args == '"') {
args++;
in_quote = 1;
if (*args == '"') {
args++;
in_quote = 1;
@@
-121,6
+119,10
@@
static char *next_arg(char *args, char **param, char **val)
next = args + i + 1;
} else
next = args + i;
next = args + i + 1;
} else
next = args + i;
+
+ /* Chew up trailing spaces. */
+ while (*next == ' ')
+ next++;
return next;
}
return next;
}
@@
-135,6
+137,10
@@
int parse_args(const char *name,
DEBUGP("Parsing ARGS: %s\n", args);
DEBUGP("Parsing ARGS: %s\n", args);
+ /* Chew leading spaces */
+ while (*args == ' ')
+ args++;
+
while (*args) {
int ret;
while (*args) {
int ret;
@@
-314,9
+320,10
@@
int param_array(const char *name,
int param_array_set(const char *val, struct kernel_param *kp)
{
struct kparam_array *arr = kp->arg;
int param_array_set(const char *val, struct kernel_param *kp)
{
struct kparam_array *arr = kp->arg;
+ unsigned int temp_num;
return param_array(kp->name, val, 1, arr->max, arr->elem,
return param_array(kp->name, val, 1, arr->max, arr->elem,
- arr->elemsize, arr->set, arr->num ?: &
arr->max
);
+ arr->elemsize, arr->set, arr->num ?: &
temp_num
);
}
int param_array_get(char *buffer, struct kernel_param *kp)
}
int param_array_get(char *buffer, struct kernel_param *kp)
@@
-541,8
+548,8
@@
static void __init kernel_param_sysfs_setup(const char *name,
{
struct module_kobject *mk;
{
struct module_kobject *mk;
- mk = k
m
alloc(sizeof(struct module_kobject), GFP_KERNEL);
-
memset(mk, 0, sizeof(struct module_kobject)
);
+ mk = k
z
alloc(sizeof(struct module_kobject), GFP_KERNEL);
+
BUG_ON(!mk
);
mk->mod = THIS_MODULE;
kobj_set_kset_s(mk, module_subsys);
mk->mod = THIS_MODULE;
kobj_set_kset_s(mk, module_subsys);
@@
-628,7
+635,7
@@
static ssize_t module_attr_show(struct kobject *kobj,
mk = to_module_kobject(kobj);
if (!attribute->show)
mk = to_module_kobject(kobj);
if (!attribute->show)
- return -E
PERM
;
+ return -E
IO
;
if (!try_module_get(mk->mod))
return -ENODEV;
if (!try_module_get(mk->mod))
return -ENODEV;
@@
-652,7
+659,7
@@
static ssize_t module_attr_store(struct kobject *kobj,
mk = to_module_kobject(kobj);
if (!attribute->store)
mk = to_module_kobject(kobj);
if (!attribute->store)
- return -E
PERM
;
+ return -E
IO
;
if (!try_module_get(mk->mod))
return -ENODEV;
if (!try_module_get(mk->mod))
return -ENODEV;