From owner-freebsd-bugs Sat May 18 12:30: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3519D37B40A for ; Sat, 18 May 2002 12:30:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g4IJU3G24399; Sat, 18 May 2002 12:30:03 -0700 (PDT) (envelope-from gnats) Date: Sat, 18 May 2002 12:30:03 -0700 (PDT) Message-Id: <200205181930.g4IJU3G24399@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Tadaaki Nagao Subject: Re: misc/30683: [PATCH] loader(8) fails to load module which has dependencies Reply-To: Tadaaki Nagao Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/30683; it has been noted by GNATS. From: Tadaaki Nagao 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message