From 4494cafc5b26af3a1503cc14256885e93bb2fa0b Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 19 Oct 2005 21:50:44 +0000 Subject: [PATCH] b=8080 better errors for 2.4 module autoloading --- lnet/lnet/api-ni.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 50fd406..0dfaae1 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -485,7 +485,7 @@ lnet_create_interface_cookie (void) int rc = gettimeofday (&tv, NULL); LASSERT (rc == 0); #else - do_gettimeofday(&tv); + do_gettimeofday(&tv); #endif cookie = tv.tv_sec; cookie *= 1000000; @@ -982,15 +982,20 @@ lnet_startup_lndnis (void) #ifdef __KERNEL__ if (lnd == NULL) { LNET_MUTEX_UP(&the_lnet.ln_lnd_mutex); - request_module(libcfs_lnd2modname(lnd_type)); + rc = request_module(libcfs_lnd2modname(lnd_type)); LNET_MUTEX_DOWN(&the_lnet.ln_lnd_mutex); lnd = lnet_find_lnd_by_type(lnd_type); if (lnd == NULL) { LNET_MUTEX_UP(&the_lnet.ln_lnd_mutex); - CERROR("Can't load LND %s, module %s\n", + CERROR("Can't load LND %s, module %s, rc=%d\n", libcfs_lnd2str(lnd_type), - libcfs_lnd2modname(lnd_type)); + libcfs_lnd2modname(lnd_type), rc); +#ifndef CONFIG_KMOD + LCONSOLE_ERROR("Your kernel must be compiled " + "with CONFIG_KMOD set for " + "automatic module loading."); +#endif goto failed; } } -- 1.8.3.1