params.c 17 KB

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