public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] modinfo vmlinux
@ 2005-12-01  8:33 Akinobu Mita
  0 siblings, 0 replies; only message in thread
From: Akinobu Mita @ 2005-12-01  8:33 UTC (permalink / raw)
  To: linux-kernel

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;
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-01  8:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-01  8:33 [PATCH] modinfo vmlinux Akinobu Mita

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox