X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=include%2Flinux%2Fmoduleparam.h;h=c3eb102a9cc81d8ed97f11deb9584aa71830b1c5;hb=3942c07ccf98e66b8893f396dca98f5b076f905f;hp=27d9da3f86ffe91c9d06aa3dc779902adbc620ad;hpb=989e6946478e722f44744990d03c6917600b8e82;p=~andy%2Flinux diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h index 27d9da3f86f..c3eb102a9cc 100644 --- a/include/linux/moduleparam.h +++ b/include/linux/moduleparam.h @@ -36,7 +36,18 @@ static const char __UNIQUE_ID(name)[] \ struct kernel_param; +/* + * Flags available for kernel_param_ops + * + * NOARG - the parameter allows for no argument (foo instead of foo=1) + */ +enum { + KERNEL_PARAM_FL_NOARG = (1 << 0) +}; + struct kernel_param_ops { + /* How the ops should behave */ + unsigned int flags; /* Returns 0, or -errno. arg is in kp->arg. */ int (*set)(const char *val, const struct kernel_param *kp); /* Returns length written or -errno. Buffer is 4k (ie. be short!) */ @@ -187,7 +198,7 @@ struct kparam_array /* Obsolete - use module_param_cb() */ #define module_param_call(name, set, get, arg, perm) \ static struct kernel_param_ops __param_ops_##name = \ - { (void *)set, (void *)get }; \ + { 0, (void *)set, (void *)get }; \ __module_param_call(MODULE_PARAM_PREFIX, \ name, &__param_ops_##name, arg, \ (perm) + sizeof(__check_old_set_param(set))*0, -1)