Date: Tue, 3 Nov 1998 12:42:18 -0500 (EST) From: Brian Feldman <green@zone.syracuse.net> To: Peter Wemm <peter@netplex.com.au> Cc: John Hay <jhay@mikom.csir.co.za>, freebsd-current@FreeBSD.ORG Subject: Re: Booting Elf Kernel : replying to myself Message-ID: <Pine.BSF.4.05.9811031241060.29837-100000@zone.syracuse.net> In-Reply-To: <199811031653.AAA24458@spinner.netplex.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
I am suggesting, rather, that a cleaner interface to it be made, and used, in the hopes of simplification. And using /modules/*.ko, and kldload(2).. Brian Feldman On Wed, 4 Nov 1998, Peter Wemm wrote: > Brian Feldman wrote: > > I am referring also that it would check to see if this file exists, and > > return a malloced answer, else return NULL. This way it would be asy to > > say something like > > char *name; > > if ((name = getkldbyname("mfs")) != NULL { > > kldload(name); > > free(name); > > } else { > > fprintf(stderr, "Could not load mfs.\n"); > > exit(1); > > } > > Well, it would have to parse the module path: > $ sysctl kern.module_path > kern.module_path: /;/boot/;/modules/ > > The kernel searches the path already, the best way to do the code above is: > > if (kldload("mfs") == -1) { > fprintf(stderr, "Could not load mfs.\n"); > exit(1); > } > > .. but the kernel will already try this in mount(2) now. I have already > got one "What???" response about having just made mount do this, so I > guess we'll have to wait and see if this is going to stay. > > > Brian Feldman > > > > On Tue, 3 Nov 1998, Brian Feldman wrote: > > > > > So should we take the VFS loading out of libc and add it to mount? Or > > > should there be a wrapper function in libc, getkldbyname (char *name) and > > > return "/modules/name.ko"? > > > > > > Brian Feldman > > > > > > On Tue, 3 Nov 1998, Peter Wemm wrote: > > > > > > > Brian Feldman wrote: > > > > > Ahhhh, that's where it is! I have no good idea on how to allow, with th > is > > > > > code, lkm's and kld's to coexist.... so is it time to completely phase > out > > > > > lkm's yet? > > > > > > > > I think the best way is to have mount(2) initiate a kldload if needed. W > e > > > > will need this functionality sooner or later. If mount(2) does it, we ca > n > > > > garbage collect unused, unmounted filesystems after a while and unload > > > > them. > > > > > > > > > Brian Feldman > > > > > > > > > > On Mon, 2 Nov 1998, John Hay wrote: > > > > > > > > > > > > Be sure to let me know when ELF kernels can autoload kld modules li > ke the > > > > > > > current a.out kernel does with lkm's. > > > > > > > > > > > > It's not the kernel that loads them. Go and look in lib/libc/gen/getv > fsent. > > > > c > > > > > > > > > > > > John > > > > > > -- > > > > > > John Hay -- John.Hay@mikom.csir.co.za > > Cheers, > -Peter > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9811031241060.29837-100000>