summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDaniel Drake <dsd@gentoo.org>2004-10-06 21:48:24 +0000
committerDaniel Drake <dsd@gentoo.org>2004-10-06 21:48:24 +0000
commitf8dc2d32f27dba5c10e7d53e3b86cffd4d187835 (patch)
treee42ad8e23c4a9907e067ce2fa6a9e72fd3759aa5 /eclass
parentAdded new sparc64 2004.3 profile in preparation for release. (diff)
downloadgentoo-2-f8dc2d32f27dba5c10e7d53e3b86cffd4d187835.tar.gz
gentoo-2-f8dc2d32f27dba5c10e7d53e3b86cffd4d187835.tar.bz2
gentoo-2-f8dc2d32f27dba5c10e7d53e3b86cffd4d187835.zip
Add convenience function for checking module support
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kernel-mod.eclass12
1 files changed, 11 insertions, 1 deletions
diff --git a/eclass/kernel-mod.eclass b/eclass/kernel-mod.eclass
index 67145ae9d36e..d7164f78bdef 100644
--- a/eclass/kernel-mod.eclass
+++ b/eclass/kernel-mod.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-mod.eclass,v 1.9 2004/10/06 21:25:11 dsd Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-mod.eclass,v 1.10 2004/10/06 21:48:24 dsd Exp $
# This eclass provides help for compiling external kernel modules from
# source.
@@ -126,6 +126,16 @@ kernel-mod_modules_supported ()
kernel-mod_configoption_builtin "MODULES"
}
+kernel-mod_check_modules_supported ()
+{
+ if ! kernel-mod_modules_supported
+ then
+ eerror "Your current kernel does not support loading external modules."
+ eerror "Please enable \"Loadable module support\" (CONFIG_MODULES) in your kernel config."
+ die "kernel does not support loading modules"
+ fi
+}
+
kernel-mod_checkzlibinflate_configured ()
{
einfo "Checking for status of CONFIG_ZLIB_INFLATE support in your kernel"