> Rick Macklem <rmack...@uoguelph.ca> writes: > > My problem is that I don't know how to deal with two modules with > > the same name. > > Why do they have to have the same name? All that matters is the fstype > and the sysctls. Just make sure that the auto-load logic loads the new > stack and not the old one if neither is loaded already. > Well, the main auto-load logic is the (n)mount(2) syscall and it does a vfs_byname_kld(fstype, td, errp), which calls kern_kldload(td, fstype, &fileid) to load the module. The argument is the "fstype", so that is what is used to find/load the module. The way sys/nfsclient is set up (and I think this is the norm for file systems), the module name is the fstype name, because
VFS_SET(nfs_vfsops, oldnfs, VFCF_NETWORK); (There is a DECLARE_MODULE() in this macro and it uses the 2nd arg. to set the module name, same as the fstype name. Just take a look at the VFS_SET() macro in sys/mount.h.) defines the module name as the 2nd argument, which is also the fstype. (You can give it another "name" via DECLARE_MODULE(), although I'm not sure if that it considered correct to do, but it will be the "fstype" that the mount(2) syscall will use to try and load it.) rick _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"