Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/msdosfs In genfs where available.
details: https://anonhg.NetBSD.org/src/rev/ca89878bfbb8
branches: trunk
changeset: 753737:ca89878bfbb8
user: pooka <pooka%NetBSD.org@localhost>
date: Thu Apr 08 16:04:35 2010 +0000
description:
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.
diffstat:
sys/fs/msdosfs/denode.h | 5 +--
sys/fs/msdosfs/msdosfs_vnops.c | 63 +++--------------------------------------
2 files changed, 6 insertions(+), 62 deletions(-)
diffs (144 lines):
diff -r 1437bc4ab876 -r ca89878bfbb8 sys/fs/msdosfs/denode.h
--- a/sys/fs/msdosfs/denode.h Thu Apr 08 15:59:37 2010 +0000
+++ b/sys/fs/msdosfs/denode.h Thu Apr 08 16:04:35 2010 +0000
@@ -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 *);
diff -r 1437bc4ab876 -r ca89878bfbb8 sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c Thu Apr 08 15:59:37 2010 +0000
+++ b/sys/fs/msdosfs/msdosfs_vnops.c Thu Apr 08 16:04:35 2010 +0000
@@ -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 */
Home |
Main Index |
Thread Index |
Old Index