Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Feb 2006 01:14:47 +0100
From:      des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
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
Message-ID:  <86wtfsp5l4.fsf@xps.des.no>
In-Reply-To: <20060218173526.GC849@garage.freebsd.pl> (Pawel Jakub Dawidek's message of "Sat, 18 Feb 2006 18:35:26 %2B0100")
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>

next in thread | previous in thread | raw e-mail | index | archive | help
Pawel Jakub Dawidek <pjd@FreeBSD.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86wtfsp5l4.fsf>