Module Name:    src
Committed By:   pooka
Date:           Thu Apr  8 16:04:35 UTC 2010

Modified Files:
        src/sys/fs/msdosfs: denode.h msdosfs_vnops.c

Log Message:
In genfs where available.

The only functional change is mknod now returning EOPNOTSUPP instead
of EINVAL.  I make this sacrifice willingly and with a clean conscience.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/fs/msdosfs/denode.h
cvs rdiff -u -r1.62 -r1.63 src/sys/fs/msdosfs/msdosfs_vnops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/fs/msdosfs/denode.h
diff -u src/sys/fs/msdosfs/denode.h:1.17 src/sys/fs/msdosfs/denode.h:1.18
--- src/sys/fs/msdosfs/denode.h:1.17	Thu Apr  8 15:03:33 2010
+++ src/sys/fs/msdosfs/denode.h	Thu Apr  8 16:04:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: denode.h,v 1.17 2010/04/08 15:03:33 pooka Exp $	*/
+/*	$NetBSD: denode.h,v 1.18 2010/04/08 16:04:35 pooka Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -259,7 +259,6 @@
  */
 int	msdosfs_lookup		(void *);
 int	msdosfs_create		(void *);
-int	msdosfs_mknod		(void *);
 int	msdosfs_close		(void *);
 int	msdosfs_access		(void *);
 int	msdosfs_getattr		(void *);
@@ -274,11 +273,9 @@
 int	msdosfs_fsync		(void *);
 #define	msdosfs_seek		genfs_seek
 int	msdosfs_remove		(void *);
-int	msdosfs_link		(void *);
 int	msdosfs_rename		(void *);
 int	msdosfs_mkdir		(void *);
 int	msdosfs_rmdir		(void *);
-int	msdosfs_symlink		(void *);
 int	msdosfs_readdir		(void *);
 #define	msdosfs_abortop		genfs_abortop
 int	msdosfs_inactive	(void *);

Index: src/sys/fs/msdosfs/msdosfs_vnops.c
diff -u src/sys/fs/msdosfs/msdosfs_vnops.c:1.62 src/sys/fs/msdosfs/msdosfs_vnops.c:1.63
--- src/sys/fs/msdosfs/msdosfs_vnops.c:1.62	Thu Apr  8 15:03:33 2010
+++ src/sys/fs/msdosfs/msdosfs_vnops.c	Thu Apr  8 16:04:35 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdosfs_vnops.c,v 1.62 2010/04/08 15:03:33 pooka Exp $	*/
+/*	$NetBSD: msdosfs_vnops.c,v 1.63 2010/04/08 16:04:35 pooka Exp $	*/
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.62 2010/04/08 15:03:33 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.63 2010/04/08 16:04:35 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,21 +171,6 @@
 }
 
 int
-msdosfs_mknod(void *v)
-{
-	struct vop_mknod_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-		struct vattr *a_vap;
-	} */ *ap = v;
-
-	PNBUF_PUT(ap->a_cnp->cn_pnbuf);
-	vput(ap->a_dvp);
-	return (EINVAL);
-}
-
-int
 msdosfs_close(void *v)
 {
 	struct vop_close_args /* {
@@ -751,25 +736,6 @@
 }
 
 /*
- * DOS filesystems don't know what links are. But since we already called
- * msdosfs_lookup() with create and lockparent, the parent is locked so we
- * have to free it before we return the error.
- */
-int
-msdosfs_link(void *v)
-{
-	struct vop_link_args /* {
-		struct vnode *a_dvp;
-		struct vnode *a_vp;
-		struct componentname *a_cnp;
-	} */ *ap = v;
-
-	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
-	vput(ap->a_dvp);
-	return (EOPNOTSUPP);
-}
-
-/*
  * Renames on files require moving the denode to a new hash queue since the
  * denode's location is used to compute which hash queue to put the file
  * in. Unless it is a rename in place.  For example "mv a b".
@@ -1384,25 +1350,6 @@
 	return (error);
 }
 
-/*
- * DOS filesystems don't know what symlinks are.
- */
-int
-msdosfs_symlink(void *v)
-{
-	struct vop_symlink_args /* {
-		struct vnode *a_dvp;
-		struct vnode **a_vpp;
-		struct componentname *a_cnp;
-		struct vattr *a_vap;
-		char *a_target;
-	} */ *ap = v;
-
-	VOP_ABORTOP(ap->a_dvp, ap->a_cnp);
-	vput(ap->a_dvp);
-	return (EOPNOTSUPP);
-}
-
 int
 msdosfs_readdir(void *v)
 {
@@ -1914,7 +1861,7 @@
 	{ &vop_default_desc, vn_default_error },
 	{ &vop_lookup_desc, msdosfs_lookup },		/* lookup */
 	{ &vop_create_desc, msdosfs_create },		/* create */
-	{ &vop_mknod_desc, msdosfs_mknod },		/* mknod */
+	{ &vop_mknod_desc, genfs_eopnotsupp },		/* mknod */
 	{ &vop_open_desc, genfs_nullop },		/* open */
 	{ &vop_close_desc, msdosfs_close },		/* close */
 	{ &vop_access_desc, msdosfs_access },		/* access */
@@ -1931,11 +1878,11 @@
 	{ &vop_fsync_desc, msdosfs_fsync },		/* fsync */
 	{ &vop_seek_desc, msdosfs_seek },		/* seek */
 	{ &vop_remove_desc, msdosfs_remove },		/* remove */
-	{ &vop_link_desc, msdosfs_link },		/* link */
+	{ &vop_link_desc, genfs_eopnotsupp },		/* link */
 	{ &vop_rename_desc, msdosfs_rename },		/* rename */
 	{ &vop_mkdir_desc, msdosfs_mkdir },		/* mkdir */
 	{ &vop_rmdir_desc, msdosfs_rmdir },		/* rmdir */
-	{ &vop_symlink_desc, msdosfs_symlink },		/* symlink */
+	{ &vop_symlink_desc, genfs_eopnotsupp },	/* symlink */
 	{ &vop_readdir_desc, msdosfs_readdir },		/* readdir */
 	{ &vop_readlink_desc, genfs_einval },		/* readlink */
 	{ &vop_abortop_desc, msdosfs_abortop },		/* abortop */

Reply via email to