]> git.karo-electronics.de Git - karo-tx-linux.git/blob - kernel/params.c
module_param: split perm field into flags and perm
[karo-tx-linux.git] / kernel / params.c
1 /* Helpers for initial module or kernel cmdline parsing
2    Copyright (C) 2001 Rusty Russell.
3
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17 */
18 #include <linux/moduleparam.h>
19 #include <linux/kernel.h>
20 #include <linux/string.h>
21 #include <linux/errno.h>
22 #include <linux/module.h>
23 #include <linux/device.h>
24 #include <linux/err.h>
25 #include <linux/slab.h>
26
27 #if 0
28 #define DEBUGP printk
29 #else
30 #define DEBUGP(fmt, a...)
31 #endif
32
33 static inline char dash2underscore(char c)
34 {
35         if (c == '-')
36                 return '_';
37         return c;
38 }
39
40 static inline int parameq(const char *input, const char *paramname)
41 {
42         unsigned int i;
43         for (i = 0; dash2underscore(input[i]) == paramname[i]; i++)
44                 if (input[i] == '\0')
45                         return 1;
46         return 0;
47 }
48
49 static int parse_one(char *param,
50                      char *val,
51                      struct kernel_param *params, 
52                      unsigned num_params,
53                      int (*handle_unknown)(char *param, char *val))
54 {
55         unsigned int i;
56
57         /* Find parameter */
58         for (i = 0; i < num_params; i++) {
59                 if (parameq(param, params[i].name)) {
60                         DEBUGP("They are equal!  Calling %p\n",
61                                params[i].set);
62                         return params[i].set(val, &params[i]);
63                 }
64         }
65
66         if (handle_unknown) {
67                 DEBUGP("Unknown argument: calling %p\n", handle_unknown);
68                 return handle_unknown(param, val);
69         }
70
71         DEBUGP("Unknown argument `%s'\n", param);
72         return -ENOENT;
73 }
74
75 /* You can use " around spaces, but can't escape ". */
76 /* Hyphens and underscores equivalent in parameter names. */
77 static char *next_arg(char *args, char **param, char **val)
78 {
79         unsigned int i, equals = 0;
80         int in_quote = 0, quoted = 0;
81         char *next;
82
83         if (*args == '"') {
84                 args++;
85                 in_quote = 1;
86                 quoted = 1;
87         }
88
89         for (i = 0; args[i]; i++) {
90                 if (args[i] == ' ' && !in_quote)
91                         break;
92                 if (equals == 0) {
93                         if (args[i] == '=')
94                                 equals = i;
95                 }
96                 if (args[i] == '"')
97                         in_quote = !in_quote;
98         }
99
100         *param = args;
101         if (!equals)
102                 *val = NULL;
103         else {
104                 args[equals] = '\0';
105                 *val = args + equals + 1;
106
107                 /* Don't include quotes in value. */
108                 if (**val == '"') {
109                         (*val)++;
110                         if (args[i-1] == '"')
111                                 args[i-1] = '\0';
112                 }
113                 if (quoted && args[i-1] == '"')
114                         args[i-1] = '\0';
115         }
116
117         if (args[i]) {
118                 args[i] = '\0';
119                 next = args + i + 1;
120         } else
121                 next = args + i;
122
123         /* Chew up trailing spaces. */
124         while (*next == ' ')
125                 next++;
126         return next;
127 }
128
129 /* Args looks like "foo=bar,bar2 baz=fuz wiz". */
130 int parse_args(const char *name,
131                char *args,
132                struct kernel_param *params,
133                unsigned num,
134                int (*unknown)(char *param, char *val))
135 {
136         char *param, *val;
137
138         DEBUGP("Parsing ARGS: %s\n", args);
139
140         /* Chew leading spaces */
141         while (*args == ' ')
142                 args++;
143
144         while (*args) {
145                 int ret;
146                 int irq_was_disabled;
147
148                 args = next_arg(args, &param, &val);
149                 irq_was_disabled = irqs_disabled();
150                 ret = parse_one(param, val, params, num, unknown);
151                 if (irq_was_disabled && !irqs_disabled()) {
152                         printk(KERN_WARNING "parse_args(): option '%s' enabled "
153                                         "irq's!\n", param);
154                 }
155                 switch (ret) {
156                 case -ENOENT:
157                         printk(KERN_ERR "%s: Unknown parameter `%s'\n",
158                                name, param);
159                         return ret;
160                 case -ENOSPC:
161                         printk(KERN_ERR
162                                "%s: `%s' too large for parameter `%s'\n",
163                                name, val ?: "", param);
164                         return ret;
165                 case 0:
166                         break;
167                 default:
168                         printk(KERN_ERR
169                                "%s: `%s' invalid for parameter `%s'\n",
170                                name, val ?: "", param);
171                         return ret;
172                 }
173         }
174
175         /* All parsed OK. */
176         return 0;
177 }
178
179 /* Lazy bastard, eh? */
180 #define STANDARD_PARAM_DEF(name, type, format, tmptype, strtolfn)       \
181         int param_set_##name(const char *val, struct kernel_param *kp)  \
182         {                                                               \
183                 tmptype l;                                              \
184                 int ret;                                                \
185                                                                         \
186                 if (!val) return -EINVAL;                               \
187                 ret = strtolfn(val, 0, &l);                             \
188                 if (ret == -EINVAL || ((type)l != l))                   \
189                         return -EINVAL;                                 \
190                 *((type *)kp->arg) = l;                                 \
191                 return 0;                                               \
192         }                                                               \
193         int param_get_##name(char *buffer, struct kernel_param *kp)     \
194         {                                                               \
195                 return sprintf(buffer, format, *((type *)kp->arg));     \
196         }
197
198 STANDARD_PARAM_DEF(byte, unsigned char, "%c", unsigned long, strict_strtoul);
199 STANDARD_PARAM_DEF(short, short, "%hi", long, strict_strtol);
200 STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, strict_strtoul);
201 STANDARD_PARAM_DEF(int, int, "%i", long, strict_strtol);
202 STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, strict_strtoul);
203 STANDARD_PARAM_DEF(long, long, "%li", long, strict_strtol);
204 STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, strict_strtoul);
205
206 int param_set_charp(const char *val, struct kernel_param *kp)
207 {
208         if (!val) {
209                 printk(KERN_ERR "%s: string parameter expected\n",
210                        kp->name);
211                 return -EINVAL;
212         }
213
214         if (strlen(val) > 1024) {
215                 printk(KERN_ERR "%s: string parameter too long\n",
216                        kp->name);
217                 return -ENOSPC;
218         }
219
220         if (kp->flags & KPARAM_KMALLOCED)
221                 kfree(*(char **)kp->arg);
222
223         /* This is a hack.  We can't need to strdup in early boot, and we
224          * don't need to; this mangled commandline is preserved. */
225         if (slab_is_available()) {
226                 kp->flags |= KPARAM_KMALLOCED;
227                 *(char **)kp->arg = kstrdup(val, GFP_KERNEL);
228                 if (!kp->arg)
229                         return -ENOMEM;
230         } else
231                 *(const char **)kp->arg = val;
232
233         return 0;
234 }
235
236 int param_get_charp(char *buffer, struct kernel_param *kp)
237 {
238         return sprintf(buffer, "%s", *((char **)kp->arg));
239 }
240
241 int param_set_bool(const char *val, struct kernel_param *kp)
242 {
243         /* No equals means "set"... */
244         if (!val) val = "1";
245
246         /* One of =[yYnN01] */
247         switch (val[0]) {
248         case 'y': case 'Y': case '1':
249                 *(int *)kp->arg = 1;
250                 return 0;
251         case 'n': case 'N': case '0':
252                 *(int *)kp->arg = 0;
253                 return 0;
254         }
255         return -EINVAL;
256 }
257
258 int param_get_bool(char *buffer, struct kernel_param *kp)
259 {
260         /* Y and N chosen as being relatively non-coder friendly */
261         return sprintf(buffer, "%c", (*(int *)kp->arg) ? 'Y' : 'N');
262 }
263
264 int param_set_invbool(const char *val, struct kernel_param *kp)
265 {
266         int boolval, ret;
267         struct kernel_param dummy;
268
269         dummy.arg = &boolval;
270         ret = param_set_bool(val, &dummy);
271         if (ret == 0)
272                 *(bool *)kp->arg = !boolval;
273         return ret;
274 }
275
276 int param_get_invbool(char *buffer, struct kernel_param *kp)
277 {
278         return sprintf(buffer, "%c", (*(bool *)kp->arg) ? 'N' : 'Y');
279 }
280
281 /* We break the rule and mangle the string. */
282 static int param_array(const char *name,
283                        const char *val,
284                        unsigned int min, unsigned int max,
285                        void *elem, int elemsize,
286                        int (*set)(const char *, struct kernel_param *kp),
287                        unsigned int *num)
288 {
289         int ret;
290         struct kernel_param kp;
291         char save;
292
293         /* Get the name right for errors. */
294         kp.name = name;
295         kp.arg = elem;
296
297         /* No equals sign? */
298         if (!val) {
299                 printk(KERN_ERR "%s: expects arguments\n", name);
300                 return -EINVAL;
301         }
302
303         *num = 0;
304         /* We expect a comma-separated list of values. */
305         do {
306                 int len;
307
308                 if (*num == max) {
309                         printk(KERN_ERR "%s: can only take %i arguments\n",
310                                name, max);
311                         return -EINVAL;
312                 }
313                 len = strcspn(val, ",");
314
315                 /* nul-terminate and parse */
316                 save = val[len];
317                 ((char *)val)[len] = '\0';
318                 ret = set(val, &kp);
319
320                 if (ret != 0)
321                         return ret;
322                 kp.arg += elemsize;
323                 val += len+1;
324                 (*num)++;
325         } while (save == ',');
326
327         if (*num < min) {
328                 printk(KERN_ERR "%s: needs at least %i arguments\n",
329                        name, min);
330                 return -EINVAL;
331         }
332         return 0;
333 }
334
335 int param_array_set(const char *val, struct kernel_param *kp)
336 {
337         const struct kparam_array *arr = kp->arr;
338         unsigned int temp_num;
339
340         return param_array(kp->name, val, 1, arr->max, arr->elem,
341                            arr->elemsize, arr->set, arr->num ?: &temp_num);
342 }
343
344 int param_array_get(char *buffer, struct kernel_param *kp)
345 {
346         int i, off, ret;
347         const struct kparam_array *arr = kp->arr;
348         struct kernel_param p;
349
350         p = *kp;
351         for (i = off = 0; i < (arr->num ? *arr->num : arr->max); i++) {
352                 if (i)
353                         buffer[off++] = ',';
354                 p.arg = arr->elem + arr->elemsize * i;
355                 ret = arr->get(buffer + off, &p);
356                 if (ret < 0)
357                         return ret;
358                 off += ret;
359         }
360         buffer[off] = '\0';
361         return off;
362 }
363
364 int param_set_copystring(const char *val, struct kernel_param *kp)
365 {
366         const struct kparam_string *kps = kp->str;
367
368         if (!val) {
369                 printk(KERN_ERR "%s: missing param set value\n", kp->name);
370                 return -EINVAL;
371         }
372         if (strlen(val)+1 > kps->maxlen) {
373                 printk(KERN_ERR "%s: string doesn't fit in %u chars.\n",
374                        kp->name, kps->maxlen-1);
375                 return -ENOSPC;
376         }
377         strcpy(kps->string, val);
378         return 0;
379 }
380
381 int param_get_string(char *buffer, struct kernel_param *kp)
382 {
383         const struct kparam_string *kps = kp->str;
384         return strlcpy(buffer, kps->string, kps->maxlen);
385 }
386
387 /* sysfs output in /sys/modules/XYZ/parameters/ */
388 #define to_module_attr(n) container_of(n, struct module_attribute, attr);
389 #define to_module_kobject(n) container_of(n, struct module_kobject, kobj);
390
391 extern struct kernel_param __start___param[], __stop___param[];
392
393 struct param_attribute
394 {
395         struct module_attribute mattr;
396         struct kernel_param *param;
397 };
398
399 struct module_param_attrs
400 {
401         unsigned int num;
402         struct attribute_group grp;
403         struct param_attribute attrs[0];
404 };
405
406 #ifdef CONFIG_SYSFS
407 #define to_param_attr(n) container_of(n, struct param_attribute, mattr);
408
409 static ssize_t param_attr_show(struct module_attribute *mattr,
410                                struct module *mod, char *buf)
411 {
412         int count;
413         struct param_attribute *attribute = to_param_attr(mattr);
414
415         if (!attribute->param->get)
416                 return -EPERM;
417
418         count = attribute->param->get(buf, attribute->param);
419         if (count > 0) {
420                 strcat(buf, "\n");
421                 ++count;
422         }
423         return count;
424 }
425
426 /* sysfs always hands a nul-terminated string in buf.  We rely on that. */
427 static ssize_t param_attr_store(struct module_attribute *mattr,
428                                 struct module *owner,
429                                 const char *buf, size_t len)
430 {
431         int err;
432         struct param_attribute *attribute = to_param_attr(mattr);
433
434         if (!attribute->param->set)
435                 return -EPERM;
436
437         err = attribute->param->set(buf, attribute->param);
438         if (!err)
439                 return len;
440         return err;
441 }
442 #endif
443
444 #ifdef CONFIG_MODULES
445 #define __modinit
446 #else
447 #define __modinit __init
448 #endif
449
450 #ifdef CONFIG_SYSFS
451 /*
452  * add_sysfs_param - add a parameter to sysfs
453  * @mk: struct module_kobject
454  * @kparam: the actual parameter definition to add to sysfs
455  * @name: name of parameter
456  *
457  * Create a kobject if for a (per-module) parameter if mp NULL, and
458  * create file in sysfs.  Returns an error on out of memory.  Always cleans up
459  * if there's an error.
460  */
461 static __modinit int add_sysfs_param(struct module_kobject *mk,
462                                      struct kernel_param *kp,
463                                      const char *name)
464 {
465         struct module_param_attrs *new;
466         struct attribute **attrs;
467         int err, num;
468
469         /* We don't bother calling this with invisible parameters. */
470         BUG_ON(!kp->perm);
471
472         if (!mk->mp) {
473                 num = 0;
474                 attrs = NULL;
475         } else {
476                 num = mk->mp->num;
477                 attrs = mk->mp->grp.attrs;
478         }
479
480         /* Enlarge. */
481         new = krealloc(mk->mp,
482                        sizeof(*mk->mp) + sizeof(mk->mp->attrs[0]) * (num+1),
483                        GFP_KERNEL);
484         if (!new) {
485                 kfree(mk->mp);
486                 err = -ENOMEM;
487                 goto fail;
488         }
489         attrs = krealloc(attrs, sizeof(new->grp.attrs[0])*(num+2), GFP_KERNEL);
490         if (!attrs) {
491                 err = -ENOMEM;
492                 goto fail_free_new;
493         }
494
495         /* Sysfs wants everything zeroed. */
496         memset(new, 0, sizeof(*new));
497         memset(&new->attrs[num], 0, sizeof(new->attrs[num]));
498         memset(&attrs[num], 0, sizeof(attrs[num]));
499         new->grp.name = "parameters";
500         new->grp.attrs = attrs;
501
502         /* Tack new one on the end. */
503         new->attrs[num].param = kp;
504         new->attrs[num].mattr.show = param_attr_show;
505         new->attrs[num].mattr.store = param_attr_store;
506         new->attrs[num].mattr.attr.name = (char *)name;
507         new->attrs[num].mattr.attr.mode = kp->perm;
508         new->num = num+1;
509
510         /* Fix up all the pointers, since krealloc can move us */
511         for (num = 0; num < new->num; num++)
512                 new->grp.attrs[num] = &new->attrs[num].mattr.attr;
513         new->grp.attrs[num] = NULL;
514
515         mk->mp = new;
516         return 0;
517
518 fail_free_new:
519         kfree(new);
520 fail:
521         mk->mp = NULL;
522         return err;
523 }
524
525 #ifdef CONFIG_MODULES
526 static void free_module_param_attrs(struct module_kobject *mk)
527 {
528         kfree(mk->mp->grp.attrs);
529         kfree(mk->mp);
530         mk->mp = NULL;
531 }
532
533 /*
534  * module_param_sysfs_setup - setup sysfs support for one module
535  * @mod: module
536  * @kparam: module parameters (array)
537  * @num_params: number of module parameters
538  *
539  * Adds sysfs entries for module parameters under
540  * /sys/module/[mod->name]/parameters/
541  */
542 int module_param_sysfs_setup(struct module *mod,
543                              struct kernel_param *kparam,
544                              unsigned int num_params)
545 {
546         int i, err;
547         bool params = false;
548
549         for (i = 0; i < num_params; i++) {
550                 if (kparam[i].perm == 0)
551                         continue;
552                 err = add_sysfs_param(&mod->mkobj, &kparam[i], kparam[i].name);
553                 if (err)
554                         return err;
555                 params = true;
556         }
557
558         if (!params)
559                 return 0;
560
561         /* Create the param group. */
562         err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp);
563         if (err)
564                 free_module_param_attrs(&mod->mkobj);
565         return err;
566 }
567
568 /*
569  * module_param_sysfs_remove - remove sysfs support for one module
570  * @mod: module
571  *
572  * Remove sysfs entries for module parameters and the corresponding
573  * kobject.
574  */
575 void module_param_sysfs_remove(struct module *mod)
576 {
577         if (mod->mkobj.mp) {
578                 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp);
579                 /* We are positive that no one is using any param
580                  * attrs at this point.  Deallocate immediately. */
581                 free_module_param_attrs(&mod->mkobj);
582         }
583 }
584 #endif
585
586 void destroy_params(const struct kernel_param *params, unsigned num)
587 {
588         unsigned int i;
589
590         for (i = 0; i < num; i++)
591                 if (params[i].flags & KPARAM_KMALLOCED)
592                         kfree(*(char **)params[i].arg);
593 }
594
595 static void __init kernel_add_sysfs_param(const char *name,
596                                           struct kernel_param *kparam,
597                                           unsigned int name_skip)
598 {
599         struct module_kobject *mk;
600         struct kobject *kobj;
601         int err;
602
603         kobj = kset_find_obj(module_kset, name);
604         if (kobj) {
605                 /* We already have one.  Remove params so we can add more. */
606                 mk = to_module_kobject(kobj);
607                 /* We need to remove it before adding parameters. */
608                 sysfs_remove_group(&mk->kobj, &mk->mp->grp);
609         } else {
610                 mk = kzalloc(sizeof(struct module_kobject), GFP_KERNEL);
611                 BUG_ON(!mk);
612
613                 mk->mod = THIS_MODULE;
614                 mk->kobj.kset = module_kset;
615                 err = kobject_init_and_add(&mk->kobj, &module_ktype, NULL,
616                                            "%s", name);
617                 if (err) {
618                         kobject_put(&mk->kobj);
619                         printk(KERN_ERR "Module '%s' failed add to sysfs, "
620                                "error number %d\n", name, err);
621                         printk(KERN_ERR "The system will be unstable now.\n");
622                         return;
623                 }
624                 /* So that exit path is even. */
625                 kobject_get(&mk->kobj);
626         }
627
628         /* These should not fail at boot. */
629         err = add_sysfs_param(mk, kparam, kparam->name + name_skip);
630         BUG_ON(err);
631         err = sysfs_create_group(&mk->kobj, &mk->mp->grp);
632         BUG_ON(err);
633         kobject_uevent(&mk->kobj, KOBJ_ADD);
634         kobject_put(&mk->kobj);
635 }
636
637 /*
638  * param_sysfs_builtin - add contents in /sys/parameters for built-in modules
639  *
640  * Add module_parameters to sysfs for "modules" built into the kernel.
641  *
642  * The "module" name (KBUILD_MODNAME) is stored before a dot, the
643  * "parameter" name is stored behind a dot in kernel_param->name. So,
644  * extract the "module" name for all built-in kernel_param-eters,
645  * and for all who have the same, call kernel_add_sysfs_param.
646  */
647 static void __init param_sysfs_builtin(void)
648 {
649         struct kernel_param *kp;
650         unsigned int name_len;
651         char modname[MODULE_NAME_LEN];
652
653         for (kp = __start___param; kp < __stop___param; kp++) {
654                 char *dot;
655
656                 if (kp->perm == 0)
657                         continue;
658
659                 dot = strchr(kp->name, '.');
660                 if (!dot) {
661                         /* This happens for core_param() */
662                         strcpy(modname, "kernel");
663                         name_len = 0;
664                 } else {
665                         name_len = dot - kp->name + 1;
666                         strlcpy(modname, kp->name, name_len);
667                 }
668                 kernel_add_sysfs_param(modname, kp, name_len);
669         }
670 }
671
672
673 /* module-related sysfs stuff */
674
675 static ssize_t module_attr_show(struct kobject *kobj,
676                                 struct attribute *attr,
677                                 char *buf)
678 {
679         struct module_attribute *attribute;
680         struct module_kobject *mk;
681         int ret;
682
683         attribute = to_module_attr(attr);
684         mk = to_module_kobject(kobj);
685
686         if (!attribute->show)
687                 return -EIO;
688
689         ret = attribute->show(attribute, mk->mod, buf);
690
691         return ret;
692 }
693
694 static ssize_t module_attr_store(struct kobject *kobj,
695                                 struct attribute *attr,
696                                 const char *buf, size_t len)
697 {
698         struct module_attribute *attribute;
699         struct module_kobject *mk;
700         int ret;
701
702         attribute = to_module_attr(attr);
703         mk = to_module_kobject(kobj);
704
705         if (!attribute->store)
706                 return -EIO;
707
708         ret = attribute->store(attribute, mk->mod, buf, len);
709
710         return ret;
711 }
712
713 static struct sysfs_ops module_sysfs_ops = {
714         .show = module_attr_show,
715         .store = module_attr_store,
716 };
717
718 static int uevent_filter(struct kset *kset, struct kobject *kobj)
719 {
720         struct kobj_type *ktype = get_ktype(kobj);
721
722         if (ktype == &module_ktype)
723                 return 1;
724         return 0;
725 }
726
727 static struct kset_uevent_ops module_uevent_ops = {
728         .filter = uevent_filter,
729 };
730
731 struct kset *module_kset;
732 int module_sysfs_initialized;
733
734 struct kobj_type module_ktype = {
735         .sysfs_ops =    &module_sysfs_ops,
736 };
737
738 /*
739  * param_sysfs_init - wrapper for built-in params support
740  */
741 static int __init param_sysfs_init(void)
742 {
743         module_kset = kset_create_and_add("module", &module_uevent_ops, NULL);
744         if (!module_kset) {
745                 printk(KERN_WARNING "%s (%d): error creating kset\n",
746                         __FILE__, __LINE__);
747                 return -ENOMEM;
748         }
749         module_sysfs_initialized = 1;
750
751         param_sysfs_builtin();
752
753         return 0;
754 }
755 subsys_initcall(param_sysfs_init);
756
757 #endif /* CONFIG_SYSFS */
758
759 EXPORT_SYMBOL(param_set_byte);
760 EXPORT_SYMBOL(param_get_byte);
761 EXPORT_SYMBOL(param_set_short);
762 EXPORT_SYMBOL(param_get_short);
763 EXPORT_SYMBOL(param_set_ushort);
764 EXPORT_SYMBOL(param_get_ushort);
765 EXPORT_SYMBOL(param_set_int);
766 EXPORT_SYMBOL(param_get_int);
767 EXPORT_SYMBOL(param_set_uint);
768 EXPORT_SYMBOL(param_get_uint);
769 EXPORT_SYMBOL(param_set_long);
770 EXPORT_SYMBOL(param_get_long);
771 EXPORT_SYMBOL(param_set_ulong);
772 EXPORT_SYMBOL(param_get_ulong);
773 EXPORT_SYMBOL(param_set_charp);
774 EXPORT_SYMBOL(param_get_charp);
775 EXPORT_SYMBOL(param_set_bool);
776 EXPORT_SYMBOL(param_get_bool);
777 EXPORT_SYMBOL(param_set_invbool);
778 EXPORT_SYMBOL(param_get_invbool);
779 EXPORT_SYMBOL(param_array_set);
780 EXPORT_SYMBOL(param_array_get);
781 EXPORT_SYMBOL(param_set_copystring);
782 EXPORT_SYMBOL(param_get_string);