summaryrefslogtreecommitdiffstats
path: root/sys/dev/digi
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-04-10 01:13:57 +0000
committerbrian <brian@FreeBSD.org>2002-04-10 01:13:57 +0000
commit8ad55476a0c93a0bcb9e3363b8a11bd9a5c02883 (patch)
tree09baefc08667f2a69a2232e92a34ddae0120a2f3 /sys/dev/digi
parentbb6d0ad1874d4e5dc01d944e588782bb11194dba (diff)
downloadFreeBSD-src-8ad55476a0c93a0bcb9e3363b8a11bd9a5c02883.zip
FreeBSD-src-8ad55476a0c93a0bcb9e3363b8a11bd9a5c02883.tar.gz
Change linker_reference_module() so that it's passed a struct
mod_depend * (which may be NULL). The only consumer of this function at the moment is digi_loadmoduledata(), and that passes a NULL mod_depend *. In linker_reference_module(), check to see if we've already got the required module loaded. If we have, bump the reference count and return that, otherwise continue the module search as normal.
Diffstat (limited to 'sys/dev/digi')
-rw-r--r--sys/dev/digi/digi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c
index 90ba01c..18ea046 100644
--- a/sys/dev/digi/digi.c
+++ b/sys/dev/digi/digi.c
@@ -1028,8 +1028,14 @@ digi_loadmoduledata(struct digi_softc *sc)
modlen = strlen(sc->module);
modfile = malloc(modlen + 6, M_TEMP, M_WAITOK);
snprintf(modfile, modlen + 6, "digi_%s", sc->module);
- if ((res = linker_reference_module(modfile, &lf)) != 0)
- printf("%s: Failed %d to load module\n", modfile, res);
+ if ((res = linker_reference_module(modfile, NULL, &lf)) != 0) {
+ if (res == ENOENT && rootdev == NODEV)
+ printf("%s: Failed to autoload module: No filesystem\n",
+ modfile);
+ else
+ printf("%s: Failed %d to autoload module\n", modfile,
+ res);
+ }
free(modfile, M_TEMP);
if (res != 0)
return (res);
OpenPOWER on IntegriCloud