From be907e4960755592d7960dc0bfb072a9431e5e1c Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 30 Dec 2003 01:00:38 -0800 Subject: [PATCH] call_usermodehelper retval fix The reworked firmware loader in the DVB patches needs the fix to the call_usermodehelper() return value. From: Rusty Russell MODULE_ALIAS_BLOCK() and MODULE_ALIAS_CHAR() define aliases of form "XXX--", so we should probe for modules using this form. Unfortunately in 2.4, block aliases were "XXX-" and char aliases were of both forms. Ideally, all modules would now be using MODULE_ALIAS() macros to define their aliases, and the old configuration files wouldn't matter as much. Unfortunately, this hasn't happened, so we make request_module() return the exit status of modprobe, and then do fallback when probing for char and block devices. (Kudos to Chris Wright, I stole his kernel_thread flags). --- include/linux/kmod.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/kmod.h b/include/linux/kmod.h index 8412faeea0f7..7c5af18df9d1 100644 --- a/include/linux/kmod.h +++ b/include/linux/kmod.h @@ -24,6 +24,8 @@ #include #ifdef CONFIG_KMOD +/* modprobe exit status on success, -ve on error. Return value + * usually useless though. */ extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2))); #else static inline int request_module(const char * name, ...) { return -ENOSYS; } -- cgit v1.2.3