module_param: invbool should take a 'bool', not an 'int'
It takes an 'int' for historical reasons, and there are only two users: simply switch it over to bool. The other user (uvesafb.c) will get a (harmless-on-x86) warning until the next patch is applied. Cc: Brad Douglas <brad@neruo.com> Cc: Michal Januszewski <spock@gentoo.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -272,13 +272,13 @@ int param_set_invbool(const char *val, struct kernel_param *kp)
|
||||
dummy.arg = &boolval;
|
||||
ret = param_set_bool(val, &dummy);
|
||||
if (ret == 0)
|
||||
*(int *)kp->arg = !boolval;
|
||||
*(bool *)kp->arg = !boolval;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int param_get_invbool(char *buffer, struct kernel_param *kp)
|
||||
{
|
||||
return sprintf(buffer, "%c", (*(int *)kp->arg) ? 'N' : 'Y');
|
||||
return sprintf(buffer, "%c", (*(bool *)kp->arg) ? 'N' : 'Y');
|
||||
}
|
||||
|
||||
/* We break the rule and mangle the string. */
|
||||
|
Reference in New Issue
Block a user