Deleted Added
full compact
smbfs_vnops.c (110500) smbfs_vnops.c (110533)
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vnops.c 110500 2003-02-07 14:33:10Z tjr $
32 * $FreeBSD: head/sys/fs/smbfs/smbfs_vnops.c 110533 2003-02-08 05:48:04Z tjr $
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/namei.h>
37#include <sys/kernel.h>
38#include <sys/proc.h>
39#include <sys/bio.h>
40#include <sys/buf.h>

--- 16 unchanged lines hidden (view full) ---

57#include <fs/smbfs/smbfs.h>
58#include <fs/smbfs/smbfs_node.h>
59#include <fs/smbfs/smbfs_subr.h>
60
61/*
62 * Prototypes for SMBFS vnode operations
63 */
64static int smbfs_create(struct vop_create_args *);
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/namei.h>
37#include <sys/kernel.h>
38#include <sys/proc.h>
39#include <sys/bio.h>
40#include <sys/buf.h>

--- 16 unchanged lines hidden (view full) ---

57#include <fs/smbfs/smbfs.h>
58#include <fs/smbfs/smbfs_node.h>
59#include <fs/smbfs/smbfs_subr.h>
60
61/*
62 * Prototypes for SMBFS vnode operations
63 */
64static int smbfs_create(struct vop_create_args *);
65static int smbfs_mknod(struct vop_mknod_args *);
65static int smbfs_open(struct vop_open_args *);
66static int smbfs_close(struct vop_close_args *);
67static int smbfs_access(struct vop_access_args *);
68static int smbfs_getattr(struct vop_getattr_args *);
69static int smbfs_setattr(struct vop_setattr_args *);
70static int smbfs_read(struct vop_read_args *);
71static int smbfs_write(struct vop_write_args *);
72static int smbfs_fsync(struct vop_fsync_args *);
73static int smbfs_remove(struct vop_remove_args *);
66static int smbfs_open(struct vop_open_args *);
67static int smbfs_close(struct vop_close_args *);
68static int smbfs_access(struct vop_access_args *);
69static int smbfs_getattr(struct vop_getattr_args *);
70static int smbfs_setattr(struct vop_setattr_args *);
71static int smbfs_read(struct vop_read_args *);
72static int smbfs_write(struct vop_write_args *);
73static int smbfs_fsync(struct vop_fsync_args *);
74static int smbfs_remove(struct vop_remove_args *);
75static int smbfs_link(struct vop_link_args *);
74static int smbfs_lookup(struct vop_lookup_args *);
75static int smbfs_rename(struct vop_rename_args *);
76static int smbfs_mkdir(struct vop_mkdir_args *);
77static int smbfs_rmdir(struct vop_rmdir_args *);
76static int smbfs_lookup(struct vop_lookup_args *);
77static int smbfs_rename(struct vop_rename_args *);
78static int smbfs_mkdir(struct vop_mkdir_args *);
79static int smbfs_rmdir(struct vop_rmdir_args *);
80static int smbfs_symlink(struct vop_symlink_args *);
78static int smbfs_readdir(struct vop_readdir_args *);
79static int smbfs_strategy(struct vop_strategy_args *);
80static int smbfs_print(struct vop_print_args *);
81static int smbfs_pathconf(struct vop_pathconf_args *ap);
82static int smbfs_advlock(struct vop_advlock_args *);
83#ifndef FB_RELENG3
84static int smbfs_getextattr(struct vop_getextattr_args *ap);
85#endif

--- 4 unchanged lines hidden (view full) ---

90 { &vop_access_desc, (vop_t *) smbfs_access },
91 { &vop_advlock_desc, (vop_t *) smbfs_advlock },
92 { &vop_close_desc, (vop_t *) smbfs_close },
93 { &vop_create_desc, (vop_t *) smbfs_create },
94 { &vop_fsync_desc, (vop_t *) smbfs_fsync },
95 { &vop_getattr_desc, (vop_t *) smbfs_getattr },
96 { &vop_getpages_desc, (vop_t *) smbfs_getpages },
97 { &vop_inactive_desc, (vop_t *) smbfs_inactive },
81static int smbfs_readdir(struct vop_readdir_args *);
82static int smbfs_strategy(struct vop_strategy_args *);
83static int smbfs_print(struct vop_print_args *);
84static int smbfs_pathconf(struct vop_pathconf_args *ap);
85static int smbfs_advlock(struct vop_advlock_args *);
86#ifndef FB_RELENG3
87static int smbfs_getextattr(struct vop_getextattr_args *ap);
88#endif

--- 4 unchanged lines hidden (view full) ---

93 { &vop_access_desc, (vop_t *) smbfs_access },
94 { &vop_advlock_desc, (vop_t *) smbfs_advlock },
95 { &vop_close_desc, (vop_t *) smbfs_close },
96 { &vop_create_desc, (vop_t *) smbfs_create },
97 { &vop_fsync_desc, (vop_t *) smbfs_fsync },
98 { &vop_getattr_desc, (vop_t *) smbfs_getattr },
99 { &vop_getpages_desc, (vop_t *) smbfs_getpages },
100 { &vop_inactive_desc, (vop_t *) smbfs_inactive },
101 { &vop_ioctl_desc, (vop_t *) smbfs_ioctl },
102 { &vop_link_desc, (vop_t *) smbfs_link },
98 { &vop_lookup_desc, (vop_t *) smbfs_lookup },
99 { &vop_mkdir_desc, (vop_t *) smbfs_mkdir },
103 { &vop_lookup_desc, (vop_t *) smbfs_lookup },
104 { &vop_mkdir_desc, (vop_t *) smbfs_mkdir },
105 { &vop_mknod_desc, (vop_t *) smbfs_mknod },
100 { &vop_open_desc, (vop_t *) smbfs_open },
101 { &vop_pathconf_desc, (vop_t *) smbfs_pathconf },
102 { &vop_print_desc, (vop_t *) smbfs_print },
103 { &vop_putpages_desc, (vop_t *) smbfs_putpages },
104 { &vop_read_desc, (vop_t *) smbfs_read },
105 { &vop_readdir_desc, (vop_t *) smbfs_readdir },
106 { &vop_reclaim_desc, (vop_t *) smbfs_reclaim },
107 { &vop_remove_desc, (vop_t *) smbfs_remove },
108 { &vop_rename_desc, (vop_t *) smbfs_rename },
109 { &vop_rmdir_desc, (vop_t *) smbfs_rmdir },
110 { &vop_setattr_desc, (vop_t *) smbfs_setattr },
111 { &vop_strategy_desc, (vop_t *) smbfs_strategy },
106 { &vop_open_desc, (vop_t *) smbfs_open },
107 { &vop_pathconf_desc, (vop_t *) smbfs_pathconf },
108 { &vop_print_desc, (vop_t *) smbfs_print },
109 { &vop_putpages_desc, (vop_t *) smbfs_putpages },
110 { &vop_read_desc, (vop_t *) smbfs_read },
111 { &vop_readdir_desc, (vop_t *) smbfs_readdir },
112 { &vop_reclaim_desc, (vop_t *) smbfs_reclaim },
113 { &vop_remove_desc, (vop_t *) smbfs_remove },
114 { &vop_rename_desc, (vop_t *) smbfs_rename },
115 { &vop_rmdir_desc, (vop_t *) smbfs_rmdir },
116 { &vop_setattr_desc, (vop_t *) smbfs_setattr },
117 { &vop_strategy_desc, (vop_t *) smbfs_strategy },
118 { &vop_symlink_desc, (vop_t *) smbfs_symlink },
112 { &vop_write_desc, (vop_t *) smbfs_write },
113#ifndef FB_RELENG3
114 { &vop_getextattr_desc, (vop_t *) smbfs_getextattr },
115/* { &vop_setextattr_desc, (vop_t *) smbfs_setextattr },*/
116#endif
117 { NULL, NULL }
118};
119

--- 541 unchanged lines hidden (view full) ---

661#ifdef possible_mistake
662 vgone(fvp);
663 if (tvp)
664 vgone(tvp);
665#endif
666 return error;
667}
668
119 { &vop_write_desc, (vop_t *) smbfs_write },
120#ifndef FB_RELENG3
121 { &vop_getextattr_desc, (vop_t *) smbfs_getextattr },
122/* { &vop_setextattr_desc, (vop_t *) smbfs_setextattr },*/
123#endif
124 { NULL, NULL }
125};
126

--- 541 unchanged lines hidden (view full) ---

668#ifdef possible_mistake
669 vgone(fvp);
670 if (tvp)
671 vgone(tvp);
672#endif
673 return error;
674}
675
676/*
677 * somtime it will come true...
678 */
669static int
679static int
680smbfs_link(ap)
681 struct vop_link_args /* {
682 struct vnode *a_tdvp;
683 struct vnode *a_vp;
684 struct componentname *a_cnp;
685 } */ *ap;
686{
687 return EOPNOTSUPP;
688}
689
690/*
691 * smbfs_symlink link create call.
692 * Sometime it will be functional...
693 */
694static int
695smbfs_symlink(ap)
696 struct vop_symlink_args /* {
697 struct vnode *a_dvp;
698 struct vnode **a_vpp;
699 struct componentname *a_cnp;
700 struct vattr *a_vap;
701 char *a_target;
702 } */ *ap;
703{
704 return EOPNOTSUPP;
705}
706
707static int
708smbfs_mknod(ap)
709 struct vop_mknod_args /* {
710 } */ *ap;
711{
712 return EOPNOTSUPP;
713}
714
715static int
670smbfs_mkdir(ap)
671 struct vop_mkdir_args /* {
672 struct vnode *a_dvp;
673 struct vnode **a_vpp;
674 struct componentname *a_cnp;
675 struct vattr *a_vap;
676 } */ *ap;
677{

--- 175 unchanged lines hidden (view full) ---

853 else
854 cr = bp->b_wcred;
855
856 if ((bp->b_flags & B_ASYNC) == 0 )
857 error = smbfs_doio(bp, cr, td);
858 return error;
859}
860
716smbfs_mkdir(ap)
717 struct vop_mkdir_args /* {
718 struct vnode *a_dvp;
719 struct vnode **a_vpp;
720 struct componentname *a_cnp;
721 struct vattr *a_vap;
722 } */ *ap;
723{

--- 175 unchanged lines hidden (view full) ---

899 else
900 cr = bp->b_wcred;
901
902 if ((bp->b_flags & B_ASYNC) == 0 )
903 error = smbfs_doio(bp, cr, td);
904 return error;
905}
906
907int
908smbfs_ioctl(ap)
909 struct vop_ioctl_args /* {
910 struct vnode *a_vp;
911 u_long a_command;
912 caddr_t a_data;
913 int fflag;
914 struct ucred *cred;
915 struct thread *td;
916 } */ *ap;
917{
918 return ENOTTY;
919}
920
861static char smbfs_atl[] = "rhsvda";
862static int
863smbfs_getextattr(struct vop_getextattr_args *ap)
864/* {
865 IN struct vnode *a_vp;
866 IN char *a_name;
867 INOUT struct uio *a_uio;
868 IN struct ucred *a_cred;

--- 413 unchanged lines hidden ---
921static char smbfs_atl[] = "rhsvda";
922static int
923smbfs_getextattr(struct vop_getextattr_args *ap)
924/* {
925 IN struct vnode *a_vp;
926 IN char *a_name;
927 INOUT struct uio *a_uio;
928 IN struct ucred *a_cred;

--- 413 unchanged lines hidden ---