summaryrefslogtreecommitdiff
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-14 20:23:01 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-14 20:23:01 -0700
commit22e1c5c4e32614bb23a817ea53b4fa4842803d21 (patch)
tree7a17e1d51a1b5004ecb64871ce14900b979a2278 /include/linux/module.h
parentd0980c12bbb794fdfef4fb0f82e08e2e94905daf (diff)
[PATCH] implement print_modules()
From: Arjan van de Ven <arjanv@redhat.com>, Rusty Russell <rusty@rustcorp.com.au> The patch below resolves the "Not Yet Implemented" print_modules() thing. This is a really useful feature for distros; it allows us to do statistical analysis on which modules are present how often in oopses compared to how often they are used normally. In addition it helps to spot candidates for certain bugs without having to go back to the customer asking for this information.
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 9a3eb2f1f95d..2709330e8684 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -24,7 +24,6 @@
/* Not Yet Implemented */
#define MODULE_SUPPORTED_DEVICE(name)
-#define print_modules()
/* v850 toolchain uses a `_' prefix for all user symbols */
#ifndef MODULE_SYMBOL_PREFIX
@@ -425,6 +424,7 @@ const struct exception_table_entry *search_module_extables(unsigned long addr);
int register_module_notifier(struct notifier_block * nb);
int unregister_module_notifier(struct notifier_block * nb);
+extern void print_modules(void);
#else /* !CONFIG_MODULES... */
#define EXPORT_SYMBOL(sym)
#define EXPORT_SYMBOL_GPL(sym)
@@ -505,6 +505,9 @@ static inline int unregister_module_notifier(struct notifier_block * nb)
#define module_put_and_exit(code) do_exit(code)
+static inline void print_modules(void)
+{
+}
#endif /* CONFIG_MODULES */
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)