[RFC] Teaching mount(8) to use nmount()
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Oct 9 06:13:17 PDT 2005
On Fri, Oct 07, 2005 at 10:46:20PM -0400, Craig Rodrigues wrote:
+> +static int
+> +use_mountprog(const char *vfstype)
+> +{
+> + /* XXX: We need to get away from implementing external mount
+> + * programs for every filesystem, and move towards having
+> + * each filesystem properly implement the nmount() system call.
+> + */
+> + unsigned int i;
+> + const char *fs[] = {
+> + "cd9660", "ext2fs", "mfs", "msdosfs", "nfs", "nfs4", "ntfs",
+> + "nwfs", "nullfs", "portalfs", "reiserfs", "smbfs", "udf", "umapfs",
+> + "unionfs",
+> + NULL
+> + };
+> +
+> + for (i=0; fs[i] != NULL; ++i) {
+> + if (strcmp(vfstype, fs[i]) == 0)
+> + return 1;
+> + }
+> +
+> + return 0;
+> +}
Can't we just check if there is an external binary in _PATH_SYSPATH?
It'll be easier to add new file system then (there will be no need to
change this function).
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20051009/e6243df2/attachment.bin
More information about the freebsd-arch
mailing list