From owner-cvs-all@FreeBSD.ORG Sun Feb 19 00:14:53 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7840716A420; Sun, 19 Feb 2006 00:14:53 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id E728743D45; Sun, 19 Feb 2006 00:14:52 +0000 (GMT) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 19ACB208A; Sun, 19 Feb 2006 01:14:48 +0100 (CET) X-Spam-Tests: AWL,BAYES_00,FORGED_RCVD_HELO X-Spam-Learn: ham X-Spam-Score: -3.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on tim.des.no Received: from xps.des.no (des.no [80.203.243.180]) by tim.des.no (Postfix) with ESMTP id 9D1FC2085; Sun, 19 Feb 2006 01:14:47 +0100 (CET) Received: by xps.des.no (Postfix, from userid 1001) id 8525F33C4C; Sun, 19 Feb 2006 01:14:47 +0100 (CET) To: Pawel Jakub Dawidek References: <200602181125.k1IBPSBu021102@repoman.freebsd.org> <20060218114331.GA849@garage.freebsd.pl> <86accor6wh.fsf@xps.des.no> <20060218172241.GB849@garage.freebsd.pl> <8664ncr2zz.fsf@xps.des.no> <20060218173526.GC849@garage.freebsd.pl> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sun, 19 Feb 2006 01:14:47 +0100 In-Reply-To: <20060218173526.GC849@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Sat, 18 Feb 2006 18:35:26 +0100") Message-ID: <86wtfsp5l4.fsf@xps.des.no> User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libutil Makefile kld.3 kld.c libutil.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2006 00:14:53 -0000 Pawel Jakub Dawidek writes: > static void > load_module(void) > { > > if (!kld_isloaded("g_%s", class_name) && > kld_load("geom_%s", class_name) =3D=3D -1) { > err(1, "failed to load geom_%s module", class_name); > } > } you have to admit this is a pretty specialized case. > Yet another option is to reimplement kld_load(3) to: > > kld_load(const char *modname, const char *kldname); > > (and eventually remove kld_isloaded(3)). uh, no. there may be times when you only want one or the other. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no