aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kmod.h
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2007-02-02 10:39:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-16 18:19:15 -0500
commitc353c3fb0700a3c17ea2b0237710a184232ccd7f (patch)
tree7b5fd590bd9b0a08bee8425ad074e993629683d1 /include/linux/kmod.h
parent89790fd789e024b23eb1fbccedd84a2015441ce0 (diff)
Driver core: let request_module() send a /sys/modules/kmod/-uevent
On recent systems, calls to /sbin/modprobe are handled by udev depending on the kind of device the kernel has discovered. This patch creates an uevent for the kernels internal request_module(), to let udev take control over the request, instead of forking the binary directly by the kernel. The direct execution of /sbin/modprobe can be disabled by setting: /sys/module/kmod/mod_request_helper (/proc/sys/kernel/modprobe) to an empty string, the same way /proc/sys/kernel/hotplug is disabled on an udev system. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/kmod.h')
-rw-r--r--include/linux/kmod.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 10f505c8431d..cc8e674ae27a 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -28,8 +28,10 @@
28#ifdef CONFIG_KMOD 28#ifdef CONFIG_KMOD
29/* modprobe exit status on success, -ve on error. Return value 29/* modprobe exit status on success, -ve on error. Return value
30 * usually useless though. */ 30 * usually useless though. */
31extern void kmod_sysfs_init(void);
31extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); 32extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
32#else 33#else
34static inline void kmod_sysfs_init(void) {};
33static inline int request_module(const char * name, ...) { return -ENOSYS; } 35static inline int request_module(const char * name, ...) { return -ENOSYS; }
34#endif 36#endif
35 37