On Saturday, September 08, 2001, Maxim Sobolev wrote:
> I don't like idea to hardcode the same string ("procfs"), with the
> same meaning in several places across kernel. As for your proposition
> to use f_fstypename to set v_tag, it is even more bogus because
> value of the f_fstypename is supplied from the user level, so
> potentially it could be anything and we can't make any reasonable
> assumptions about mapping between its value and type of the filesystem
> in question. 

   How do you figure?  The contents if `f_fstypename' must match
a configured file system exactly, so it could _not_ be anything.
To quote sys/kern/vfs_syscalls.c:mount():

        if ((error = copyinstr(SCARG(uap, type), fstypename, MFSNAMELEN, NULL))
                return (error);
        for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next)
                if (!strcmp(vfsp->vfc_name, fstypename))
        if (vfsp == NULL) {
                /* ... try and load a module ... */
                /* ... fail if no module can be found, or no
                 * matching VFS is loaded */

| Chris Costello    | You depend too much on computers for information. |
| [EMAIL PROTECTED] |                                                   |

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

Reply via email to