params.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. /* Helpers for initial module or kernel cmdline parsing
  2. Copyright (C) 2001 Rusty Russell.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  14. */
  15. #include <linux/config.h>
  16. #include <linux/moduleparam.h>
  17. #include <linux/kernel.h>
  18. #include <linux/string.h>
  19. #include <linux/errno.h>
  20. #include <linux/module.h>
  21. #include <linux/device.h>
  22. #include <linux/err.h>
  23. #include <linux/slab.h>
  24. #if 0
  25. #define DEBUGP printk
  26. #else
  27. #define DEBUGP(fmt, a...)
  28. #endif
  29. static inline int dash2underscore(char c)
  30. {
  31. if (c == '-')
  32. return '_';
  33. return c;
  34. }
  35. static inline int parameq(const char *input, const char *paramname)
  36. {
  37. unsigned int i;
  38. for (i = 0; dash2underscore(input[i]) == paramname[i]; i++)
  39. if (input[i] == '\0')
  40. return 1;
  41. return 0;
  42. }
  43. static int parse_one(char *param,
  44. char *val,
  45. struct kernel_param *params,
  46. unsigned num_params,
  47. int (*handle_unknown)(char *param, char *val))
  48. {
  49. unsigned int i;
  50. /* Find parameter */
  51. for (i = 0; i < num_params; i++) {
  52. if (parameq(param, params[i].name)) {
  53. DEBUGP("They are equal! Calling %p\n",
  54. params[i].set);
  55. return params[i].set(val, &params[i]);
  56. }
  57. }
  58. if (handle_unknown) {
  59. DEBUGP("Unknown argument: calling %p\n", handle_unknown);
  60. return handle_unknown(param, val);
  61. }
  62. DEBUGP("Unknown argument `%s'\n", param);
  63. return -ENOENT;
  64. }
  65. /* You can use " around spaces, but can't escape ". */
  66. /* Hyphens and underscores equivalent in parameter names. */
  67. static char *next_arg(char *args, char **param, char **val)
  68. {
  69. unsigned int i, equals = 0;
  70. int in_quote = 0, quoted = 0;
  71. char *next;
  72. if (*args == '"') {
  73. args++;
  74. in_quote = 1;
  75. quoted = 1;
  76. }
  77. for (i = 0; args[i]; i++) {
  78. if (args[i] == ' ' && !in_quote)
  79. break;
  80. if (equals == 0) {
  81. if (args[i] == '=')
  82. equals = i;
  83. }
  84. if (args[i] == '"')
  85. in_quote = !in_quote;
  86. }
  87. *param = args;
  88. if (!equals)
  89. *val = NULL;
  90. else {
  91. args[equals] = '\0';
  92. *val = args + equals + 1;
  93. /* Don't include quotes in value. */
  94. if (**val == '"') {
  95. (*val)++;
  96. if (args[i-1] == '"')
  97. args[i-1] = '\0';
  98. }
  99. if (quoted && args[i-1] == '"')
  100. args[i-1] = '\0';
  101. }
  102. if (args[i]) {
  103. args[i] = '\0';
  104. next = args + i + 1;
  105. } else
  106. next = args + i;
  107. /* Chew up trailing spaces. */
  108. while (*next == ' ')
  109. next++;
  110. return next;
  111. }
  112. /* Args looks like "foo=bar,bar2 baz=fuz wiz". */
  113. int parse_args(const char *name,
  114. char *args,
  115. struct kernel_param *params,
  116. unsigned num,
  117. int (*unknown)(char *param, char *val))
  118. {
  119. char *param, *val;
  120. DEBUGP("Parsing ARGS: %s\n", args);
  121. /* Chew leading spaces */
  122. while (*args == ' ')
  123. args++;
  124. while (*args) {
  125. int ret;
  126. args = next_arg(args, &param, &val);
  127. ret = parse_one(param, val, params, num, unknown);
  128. switch (ret) {
  129. case -ENOENT:
  130. printk(KERN_ERR "%s: Unknown parameter `%s'\n",
  131. name, param);
  132. return ret;
  133. case -ENOSPC:
  134. printk(KERN_ERR
  135. "%s: `%s' too large for parameter `%s'\n",
  136. name, val ?: "", param);
  137. return ret;
  138. case 0:
  139. break;
  140. default:
  141. printk(KERN_ERR
  142. "%s: `%s' invalid for parameter `%s'\n",
  143. name, val ?: "", param);
  144. return ret;
  145. }
  146. }
  147. /* All parsed OK. */
  148. return 0;
  149. }
  150. /* Lazy bastard, eh? */
  151. #define STANDARD_PARAM_DEF(name, type, format, tmptype, strtolfn) \
  152. int param_set_##name(const char *val, struct kernel_param *kp) \
  153. { \
  154. char *endp; \
  155. tmptype l; \
  156. \
  157. if (!val) return -EINVAL; \
  158. l = strtolfn(val, &endp, 0); \
  159. if (endp == val || ((type)l != l)) \
  160. return -EINVAL; \
  161. *((type *)kp->arg) = l; \
  162. return 0; \
  163. } \
  164. int param_get_##name(char *buffer, struct kernel_param *kp) \
  165. { \
  166. return sprintf(buffer, format, *((type *)kp->arg)); \
  167. }
  168. STANDARD_PARAM_DEF(byte, unsigned char, "%c", unsigned long, simple_strtoul);
  169. STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol);
  170. STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", unsigned long, simple_strtoul);
  171. STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol);
  172. STANDARD_PARAM_DEF(uint, unsigned int, "%u", unsigned long, simple_strtoul);
  173. STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol);
  174. STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul);
  175. int param_set_charp(const char *val, struct kernel_param *kp)
  176. {
  177. if (!val) {
  178. printk(KERN_ERR "%s: string parameter expected\n",
  179. kp->name);
  180. return -EINVAL;
  181. }
  182. if (strlen(val) > 1024) {
  183. printk(KERN_ERR "%s: string parameter too long\n",
  184. kp->name);
  185. return -ENOSPC;
  186. }
  187. *(char **)kp->arg = (char *)val;
  188. return 0;
  189. }
  190. int param_get_charp(char *buffer, struct kernel_param *kp)
  191. {
  192. return sprintf(buffer, "%s", *((char **)kp->arg));
  193. }
  194. int param_set_bool(const char *val, struct kernel_param *kp)
  195. {
  196. /* No equals means "set"... */
  197. if (!val) val = "1";
  198. /* One of =[yYnN01] */
  199. switch (val[0]) {
  200. case 'y': case 'Y': case '1':
  201. *(int *)kp->arg = 1;
  202. return 0;
  203. case 'n': case 'N': case '0':
  204. *(int *)kp->arg = 0;
  205. return 0;
  206. }
  207. return -EINVAL;
  208. }
  209. int param_get_bool(char *buffer, struct kernel_param *kp)
  210. {
  211. /* Y and N chosen as being relatively non-coder friendly */
  212. return sprintf(buffer, "%c", (*(int *)kp->arg) ? 'Y' : 'N');
  213. }
  214. int param_set_invbool(const char *val, struct kernel_param *kp)
  215. {
  216. int boolval, ret;
  217. struct kernel_param dummy = { .arg = &boolval };
  218. ret = param_set_bool(val, &dummy);
  219. if (ret == 0)
  220. *(int *)kp->arg = !boolval;
  221. return ret;
  222. }
  223. int param_get_invbool(char *buffer, struct kernel_param *kp)
  224. {
  225. int val;
  226. struct kernel_param dummy = { .arg = &val };
  227. val = !*(int *)kp->arg;
  228. return param_get_bool(buffer, &dummy);
  229. }
  230. /* We cheat here and temporarily mangle the string. */
  231. int param_array(const char *name,
  232. const char *val,
  233. unsigned int min, unsigned int max,
  234. void *elem, int elemsize,
  235. int (*set)(const char *, struct kernel_param *kp),
  236. int *num)
  237. {
  238. int ret;
  239. struct kernel_param kp;
  240. char save;
  241. /* Get the name right for errors. */
  242. kp.name = name;
  243. kp.arg = elem;
  244. /* No equals sign? */
  245. if (!val) {
  246. printk(KERN_ERR "%s: expects arguments\n", name);
  247. return -EINVAL;
  248. }
  249. *num = 0;
  250. /* We expect a comma-separated list of values. */
  251. do {
  252. int len;
  253. if (*num == max) {
  254. printk(KERN_ERR "%s: can only take %i arguments\n",
  255. name, max);
  256. return -EINVAL;
  257. }
  258. len = strcspn(val, ",");
  259. /* nul-terminate and parse */
  260. save = val[len];
  261. ((char *)val)[len] = '\0';
  262. ret = set(val, &kp);
  263. if (ret != 0)
  264. return ret;
  265. kp.arg += elemsize;
  266. val += len+1;
  267. (*num)++;
  268. } while (save == ',');
  269. if (*num < min) {
  270. printk(KERN_ERR "%s: needs at least %i arguments\n",
  271. name, min);
  272. return -EINVAL;
  273. }
  274. return 0;
  275. }
  276. int param_array_set(const char *val, struct kernel_param *kp)
  277. {
  278. struct kparam_array *arr = kp->arg;
  279. unsigned int temp_num;
  280. return param_array(kp->name, val, 1, arr->max, arr->elem,
  281. arr->elemsize, arr->set, arr->num ?: &temp_num);
  282. }
  283. int param_array_get(char *buffer, struct kernel_param *kp)
  284. {
  285. int i, off, ret;
  286. struct kparam_array *arr = kp->arg;
  287. struct kernel_param p;
  288. p = *kp;
  289. for (i = off = 0; i < (arr->num ? *arr->num : arr->max); i++) {
  290. if (i)
  291. buffer[off++] = ',';
  292. p.arg = arr->elem + arr->elemsize * i;
  293. ret = arr->get(buffer + off, &p);
  294. if (ret < 0)
  295. return ret;
  296. off += ret;
  297. }
  298. buffer[off] = '\0';
  299. return off;
  300. }
  301. int param_set_copystring(const char *val, struct kernel_param *kp)
  302. {
  303. struct kparam_string *kps = kp->arg;
  304. if (strlen(val)+1 > kps->maxlen) {
  305. printk(KERN_ERR "%s: string doesn't fit in %u chars.\n",
  306. kp->name, kps->maxlen-1);
  307. return -ENOSPC;
  308. }
  309. strcpy(kps->string, val);
  310. return 0;
  311. }
  312. int param_get_string(char *buffer, struct kernel_param *kp)
  313. {
  314. struct kparam_string *kps = kp->arg;
  315. return strlcpy(buffer, kps->string, kps->maxlen);
  316. }
  317. /* sysfs output in /sys/modules/XYZ/parameters/ */
  318. extern struct kernel_param __start___param[], __stop___param[];
  319. #define MAX_KBUILD_MODNAME KOBJ_NAME_LEN
  320. struct param_attribute
  321. {
  322. struct module_attribute mattr;
  323. struct kernel_param *param;
  324. };
  325. struct module_param_attrs
  326. {
  327. struct attribute_group grp;
  328. struct param_attribute attrs[0];
  329. };
  330. #define to_param_attr(n) container_of(n, struct param_attribute, mattr);
  331. static ssize_t param_attr_show(struct module_attribute *mattr,
  332. struct module *mod, char *buf)
  333. {
  334. int count;
  335. struct param_attribute *attribute = to_param_attr(mattr);
  336. if (!attribute->param->get)
  337. return -EPERM;
  338. count = attribute->param->get(buf, attribute->param);
  339. if (count > 0) {
  340. strcat(buf, "\n");
  341. ++count;
  342. }
  343. return count;
  344. }
  345. /* sysfs always hands a nul-terminated string in buf. We rely on that. */
  346. static ssize_t param_attr_store(struct module_attribute *mattr,
  347. struct module *owner,
  348. const char *buf, size_t len)
  349. {
  350. int err;
  351. struct param_attribute *attribute = to_param_attr(mattr);
  352. if (!attribute->param->set)
  353. return -EPERM;
  354. err = attribute->param->set(buf, attribute->param);
  355. if (!err)
  356. return len;
  357. return err;
  358. }
  359. #ifdef CONFIG_MODULES
  360. #define __modinit
  361. #else
  362. #define __modinit __init
  363. #endif
  364. /*
  365. * param_sysfs_setup - setup sysfs support for one module or KBUILD_MODNAME
  366. * @mk: struct module_kobject (contains parent kobject)
  367. * @kparam: array of struct kernel_param, the actual parameter definitions
  368. * @num_params: number of entries in array
  369. * @name_skip: offset where the parameter name start in kparam[].name. Needed for built-in "modules"
  370. *
  371. * Create a kobject for a (per-module) group of parameters, and create files
  372. * in sysfs. A pointer to the param_kobject is returned on success,
  373. * NULL if there's no parameter to export, or other ERR_PTR(err).
  374. */
  375. static __modinit struct module_param_attrs *
  376. param_sysfs_setup(struct module_kobject *mk,
  377. struct kernel_param *kparam,
  378. unsigned int num_params,
  379. unsigned int name_skip)
  380. {
  381. struct module_param_attrs *mp;
  382. unsigned int valid_attrs = 0;
  383. unsigned int i, size[2];
  384. struct param_attribute *pattr;
  385. struct attribute **gattr;
  386. int err;
  387. for (i=0; i<num_params; i++) {
  388. if (kparam[i].perm)
  389. valid_attrs++;
  390. }
  391. if (!valid_attrs)
  392. return NULL;
  393. size[0] = ALIGN(sizeof(*mp) +
  394. valid_attrs * sizeof(mp->attrs[0]),
  395. sizeof(mp->grp.attrs[0]));
  396. size[1] = (valid_attrs + 1) * sizeof(mp->grp.attrs[0]);
  397. mp = kmalloc(size[0] + size[1], GFP_KERNEL);
  398. if (!mp)
  399. return ERR_PTR(-ENOMEM);
  400. mp->grp.name = "parameters";
  401. mp->grp.attrs = (void *)mp + size[0];
  402. pattr = &mp->attrs[0];
  403. gattr = &mp->grp.attrs[0];
  404. for (i = 0; i < num_params; i++) {
  405. struct kernel_param *kp = &kparam[i];
  406. if (kp->perm) {
  407. pattr->param = kp;
  408. pattr->mattr.show = param_attr_show;
  409. pattr->mattr.store = param_attr_store;
  410. pattr->mattr.attr.name = (char *)&kp->name[name_skip];
  411. pattr->mattr.attr.owner = mk->mod;
  412. pattr->mattr.attr.mode = kp->perm;
  413. *(gattr++) = &(pattr++)->mattr.attr;
  414. }
  415. }
  416. *gattr = NULL;
  417. if ((err = sysfs_create_group(&mk->kobj, &mp->grp))) {
  418. kfree(mp);
  419. return ERR_PTR(err);
  420. }
  421. return mp;
  422. }
  423. #ifdef CONFIG_MODULES
  424. /*
  425. * module_param_sysfs_setup - setup sysfs support for one module
  426. * @mod: module
  427. * @kparam: module parameters (array)
  428. * @num_params: number of module parameters
  429. *
  430. * Adds sysfs entries for module parameters, and creates a link from
  431. * /sys/module/[mod->name]/parameters to /sys/parameters/[mod->name]/
  432. */
  433. int module_param_sysfs_setup(struct module *mod,
  434. struct kernel_param *kparam,
  435. unsigned int num_params)
  436. {
  437. struct module_param_attrs *mp;
  438. mp = param_sysfs_setup(&mod->mkobj, kparam, num_params, 0);
  439. if (IS_ERR(mp))
  440. return PTR_ERR(mp);
  441. mod->param_attrs = mp;
  442. return 0;
  443. }
  444. /*
  445. * module_param_sysfs_remove - remove sysfs support for one module
  446. * @mod: module
  447. *
  448. * Remove sysfs entries for module parameters and the corresponding
  449. * kobject.
  450. */
  451. void module_param_sysfs_remove(struct module *mod)
  452. {
  453. if (mod->param_attrs) {
  454. sysfs_remove_group(&mod->mkobj.kobj,
  455. &mod->param_attrs->grp);
  456. /* We are positive that no one is using any param
  457. * attrs at this point. Deallocate immediately. */
  458. kfree(mod->param_attrs);
  459. mod->param_attrs = NULL;
  460. }
  461. }
  462. #endif
  463. /*
  464. * kernel_param_sysfs_setup - wrapper for built-in params support
  465. */
  466. static void __init kernel_param_sysfs_setup(const char *name,
  467. struct kernel_param *kparam,
  468. unsigned int num_params,
  469. unsigned int name_skip)
  470. {
  471. struct module_kobject *mk;
  472. mk = kzalloc(sizeof(struct module_kobject), GFP_KERNEL);
  473. BUG_ON(!mk);
  474. mk->mod = THIS_MODULE;
  475. kobj_set_kset_s(mk, module_subsys);
  476. kobject_set_name(&mk->kobj, name);
  477. kobject_register(&mk->kobj);
  478. /* no need to keep the kobject if no parameter is exported */
  479. if (!param_sysfs_setup(mk, kparam, num_params, name_skip)) {
  480. kobject_unregister(&mk->kobj);
  481. kfree(mk);
  482. }
  483. }
  484. /*
  485. * param_sysfs_builtin - add contents in /sys/parameters for built-in modules
  486. *
  487. * Add module_parameters to sysfs for "modules" built into the kernel.
  488. *
  489. * The "module" name (KBUILD_MODNAME) is stored before a dot, the
  490. * "parameter" name is stored behind a dot in kernel_param->name. So,
  491. * extract the "module" name for all built-in kernel_param-eters,
  492. * and for all who have the same, call kernel_param_sysfs_setup.
  493. */
  494. static void __init param_sysfs_builtin(void)
  495. {
  496. struct kernel_param *kp, *kp_begin = NULL;
  497. unsigned int i, name_len, count = 0;
  498. char modname[MAX_KBUILD_MODNAME + 1] = "";
  499. for (i=0; i < __stop___param - __start___param; i++) {
  500. char *dot;
  501. kp = &__start___param[i];
  502. /* We do not handle args without periods. */
  503. dot = memchr(kp->name, '.', MAX_KBUILD_MODNAME);
  504. if (!dot) {
  505. DEBUGP("couldn't find period in %s\n", kp->name);
  506. continue;
  507. }
  508. name_len = dot - kp->name;
  509. /* new kbuild_modname? */
  510. if (strlen(modname) != name_len
  511. || strncmp(modname, kp->name, name_len) != 0) {
  512. /* add a new kobject for previous kernel_params. */
  513. if (count)
  514. kernel_param_sysfs_setup(modname,
  515. kp_begin,
  516. count,
  517. strlen(modname)+1);
  518. strncpy(modname, kp->name, name_len);
  519. modname[name_len] = '\0';
  520. count = 0;
  521. kp_begin = kp;
  522. }
  523. count++;
  524. }
  525. /* last kernel_params need to be registered as well */
  526. if (count)
  527. kernel_param_sysfs_setup(modname, kp_begin, count,
  528. strlen(modname)+1);
  529. }
  530. /* module-related sysfs stuff */
  531. #ifdef CONFIG_SYSFS
  532. #define to_module_attr(n) container_of(n, struct module_attribute, attr);
  533. #define to_module_kobject(n) container_of(n, struct module_kobject, kobj);
  534. static ssize_t module_attr_show(struct kobject *kobj,
  535. struct attribute *attr,
  536. char *buf)
  537. {
  538. struct module_attribute *attribute;
  539. struct module_kobject *mk;
  540. int ret;
  541. attribute = to_module_attr(attr);
  542. mk = to_module_kobject(kobj);
  543. if (!attribute->show)
  544. return -EIO;
  545. if (!try_module_get(mk->mod))
  546. return -ENODEV;
  547. ret = attribute->show(attribute, mk->mod, buf);
  548. module_put(mk->mod);
  549. return ret;
  550. }
  551. static ssize_t module_attr_store(struct kobject *kobj,
  552. struct attribute *attr,
  553. const char *buf, size_t len)
  554. {
  555. struct module_attribute *attribute;
  556. struct module_kobject *mk;
  557. int ret;
  558. attribute = to_module_attr(attr);
  559. mk = to_module_kobject(kobj);
  560. if (!attribute->store)
  561. return -EIO;
  562. if (!try_module_get(mk->mod))
  563. return -ENODEV;
  564. ret = attribute->store(attribute, mk->mod, buf, len);
  565. module_put(mk->mod);
  566. return ret;
  567. }
  568. static struct sysfs_ops module_sysfs_ops = {
  569. .show = module_attr_show,
  570. .store = module_attr_store,
  571. };
  572. #else
  573. static struct sysfs_ops module_sysfs_ops = {
  574. .show = NULL,
  575. .store = NULL,
  576. };
  577. #endif
  578. static struct kobj_type module_ktype = {
  579. .sysfs_ops = &module_sysfs_ops,
  580. };
  581. decl_subsys(module, &module_ktype, NULL);
  582. /*
  583. * param_sysfs_init - wrapper for built-in params support
  584. */
  585. static int __init param_sysfs_init(void)
  586. {
  587. subsystem_register(&module_subsys);
  588. param_sysfs_builtin();
  589. return 0;
  590. }
  591. __initcall(param_sysfs_init);
  592. EXPORT_SYMBOL(param_set_byte);
  593. EXPORT_SYMBOL(param_get_byte);
  594. EXPORT_SYMBOL(param_set_short);
  595. EXPORT_SYMBOL(param_get_short);
  596. EXPORT_SYMBOL(param_set_ushort);
  597. EXPORT_SYMBOL(param_get_ushort);
  598. EXPORT_SYMBOL(param_set_int);
  599. EXPORT_SYMBOL(param_get_int);
  600. EXPORT_SYMBOL(param_set_uint);
  601. EXPORT_SYMBOL(param_get_uint);
  602. EXPORT_SYMBOL(param_set_long);
  603. EXPORT_SYMBOL(param_get_long);
  604. EXPORT_SYMBOL(param_set_ulong);
  605. EXPORT_SYMBOL(param_get_ulong);
  606. EXPORT_SYMBOL(param_set_charp);
  607. EXPORT_SYMBOL(param_get_charp);
  608. EXPORT_SYMBOL(param_set_bool);
  609. EXPORT_SYMBOL(param_get_bool);
  610. EXPORT_SYMBOL(param_set_invbool);
  611. EXPORT_SYMBOL(param_get_invbool);
  612. EXPORT_SYMBOL(param_array_set);
  613. EXPORT_SYMBOL(param_array_get);
  614. EXPORT_SYMBOL(param_set_copystring);
  615. EXPORT_SYMBOL(param_get_string);