cvs commit: src/lib/libutil Makefile kld.3 kld.c libutil.h

Dag-Erling Smørgrav des at des.no
Sat Feb 18 16:14:53 PST 2006


Pawel Jakub Dawidek <pjd at FreeBSD.org> writes:
> static void
> load_module(void)
> {
>
> 	if (!kld_isloaded("g_%s", class_name) &&
> 	    kld_load("geom_%s", class_name) == -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
-- 
Dag-Erling Smørgrav - des at des.no


More information about the cvs-src mailing list