aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/digi
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2002-04-10 01:13:57 +0000
committerBrian Somers <brian@FreeBSD.org>2002-04-10 01:13:57 +0000
commit96987c74d66bbaf822f59d550460259611a7ed1d (patch)
tree09baefc08667f2a69a2232e92a34ddae0120a2f3 /sys/dev/digi
parenta1b85c51bbe734c7635be4a4b8ead833009c703f (diff)
downloadsrc-96987c74d66bbaf822f59d550460259611a7ed1d.tar.gz
src-96987c74d66bbaf822f59d550460259611a7ed1d.zip
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.
Notes
Notes: svn path=/head/; revision=94321
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 90ba01c94156..18ea046732c6 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);