On Tue, 30 May 2000, Garrett Wollman wrote:

> <<On Tue, 30 May 2000 16:20:53 -0400, "Yevmenkin, Maksim N, CSCIO" 
><[EMAIL PROTECTED]> said:
> 
> > i know that :) i guess my questions were
> > 1) why the same piece of code duplicated in all ``mount_xxx'' utilities?
> 
> Because the original loadable module system held strongly to the
> religion that the kernel should never load anything of its own
> accord.  The designers of the current loadable module system made
> different design choices, but the some traces of its predecessor still
> remain.

Including defunct traces like all the duplicated code in the mount utilities
:-).

Relevant history:

RCS file: /home/ncvs/src/lib/libc/gen/getvfsent.c,v
Working file: getvfsent.c
head: 1.14
----------------------------
revision 1.13
date: 1998/11/03 15:02:29;  author: peter;  state: Exp;  lines: +10 -1
A feeble attempt at kld compatability.  The mount_* programs assume that
they cannot mount a filesystem that they cannot see in getvfsbyname().
Part 1 of this is a hack, make vfsisloadable() always return true - the
ultimate decider of whether it's loadable or not is kldload() or mount().
Part 2 of this is to have vfsload() call kldload(2) and return success if
it works.  This means that we will use a viable kld module in preference
to an LKM!
Ultimately, the thing to do is remove the hacks to do a vfsload in all the
^^^^^^^^^^ should have been more than a year ago
mount_* commands and let the kernel do it by itself in mount(2).
----------------------------

RCS file: /home/ncvs/src/sys/kern/vfs_syscalls.c,v
Working file: vfs_syscalls.c
head: 1.153
...
----------------------------
revision 1.110
date: 1998/11/03 14:29:09;  author: peter;  state: Exp;  lines: +32 -3
make mount(2) automatically kldload modules if the requested filesystem
isn't present.
----------------------------

This commit made the duplicated code redundant except for backwards
compatibility.

Bruce



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to