From: Akinobu Mita <mita@miraclelinux.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] modinfo vmlinux
Date: Thu, 1 Dec 2005 17:33:53 +0900 [thread overview]
Message-ID: <20051201083353.GA6060@miraclelinux.com> (raw)
Sometimes I want to know which kind of kernel parameters are available
for modules that are built into the kernel image.
This patch supports modinfo for vmlinux.
# modinfo -p vmlinux
i8042.nokbd:Do not probe or use KBD port.
i8042.noaux:Do not probe or use AUX (mouse) port.
i8042.nomux:Do not check whether an active multiplexing conrtoller is present.
:
tcp_bic.initial_ssthresh:initial value of slow start threshold
tcp_bic.bic_scale:scale (scaled by 1024) value for bic function (bic_scale/1024)
tcp_bic.tcp_friendliness:turn on/off tcp friendliness
Signed-off-by: Akinobu Mita <mita@miraclelinux.com>
--- 2.6-rc/include/linux/module.h.orig 2005-12-01 13:06:56.000000000 +0900
+++ 2.6-rc/include/linux/module.h 2005-12-01 14:31:04.000000000 +0900
@@ -134,7 +134,7 @@ extern struct module __this_module;
/* One for each parameter, describing how to use it. Some files do
multiple of these per line, so can't just use MODULE_INFO. */
#define MODULE_PARM_DESC(_parm, desc) \
- __MODULE_INFO(parm, _parm, #_parm ":" desc)
+ __MODULE_INFO(parm, _parm, MODULE_PARAM_PREFIX #_parm ":" desc)
#define MODULE_DEVICE_TABLE(type,name) \
MODULE_GENERIC_TABLE(type##_device,name)
--- 2.6-rc/include/linux/moduleparam.h.orig 2005-11-30 20:57:56.000000000 +0900
+++ 2.6-rc/include/linux/moduleparam.h 2005-12-01 14:30:17.000000000 +0900
@@ -13,18 +13,14 @@
#define MODULE_PARAM_PREFIX __stringify(KBUILD_MODNAME) "."
#endif
-#ifdef MODULE
#define ___module_cat(a,b) __mod_ ## a ## b
#define __module_cat(a,b) ___module_cat(a,b)
#define __MODULE_INFO(tag, name, info) \
static const char __module_cat(name,__LINE__)[] \
__attribute_used__ \
__attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
-#else /* !MODULE */
-#define __MODULE_INFO(tag, name, info)
-#endif
#define __MODULE_PARM_TYPE(name, _type) \
- __MODULE_INFO(parmtype, name##type, #name ":" _type)
+ __MODULE_INFO(parmtype, name##type, MODULE_PARAM_PREFIX #name ":" _type)
struct kernel_param;
reply other threads:[~2005-12-01 8:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051201083353.GA6060@miraclelinux.com \
--to=mita@miraclelinux.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox