Date: Sat, 18 May 2002 12:30:03 -0700 (PDT) From: Tadaaki Nagao <tada@rr.iij4u.or.jp> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/30683: [PATCH] loader(8) fails to load module which has dependencies Message-ID: <200205181930.g4IJU3G24399@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/30683; it has been noted by GNATS.
From: Tadaaki Nagao <tada@rr.iij4u.or.jp>
To: freebsd-gnats-submit@FreeBSD.org, harashi@jazz.email.ne.jp
Cc:
Subject: Re: misc/30683: [PATCH] loader(8) fails to load module which has
dependencies
Date: Sun, 19 May 2002 04:23:17 +0900 (JST)
Hi,
(I'm writing this mail in the hope of attracting committer's
interest to this PR misc/30683...)
I suffered from a loader(8) problem in RELENG_4 and fixed it myself,
not having realized that the problem has been already filed as a PR
by Harashino-san.
My fix is similar to Harashino-san's, but it looks simpler, as
attached below.
Index: module.c
===================================================================
RCS file: /usr/ncvs/src/sys/boot/common/module.c,v
retrieving revision 1.13.2.3
diff -u -r1.13.2.3 module.c
--- module.c 12 Jun 2001 15:35:14 -0000 1.13.2.3
+++ module.c 13 Mar 2002 03:08:03 -0000
@@ -363,18 +363,17 @@
md = mod_findmetadata(base_file, MODINFOMD_DEPLIST);
if (md == NULL)
return (0);
- error = 0;
do {
dmodname = (char *)md->md_data;
if (mod_findmodule(NULL, dmodname) == NULL) {
printf("loading required module '%s'\n", dmodname);
error = mod_load(dmodname, 0, NULL);
if (error && error != EEXIST)
- break;
+ return (error);
}
md = metadata_next(md, MODINFOMD_DEPLIST);
} while (md);
- return (error);
+ return (0);
}
/*
While Harashino-san's patch in PR misc/30683 also modifies what string
will be passed to mod_findmodule() by strcat'ing dmodname with ".ko",
I don't see why this is needed. Perhaps there might be something I'm
overlooking.
I'd appreciate it if someone would give any comments to my patch
above and/or point me to any information I'm overlooking.
Thanks,
Tadaaki Nagao <tada@rr.iij4u.or.jp>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205181930.g4IJU3G24399>
