[PATCH] modinfo vmlinux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux