Deleted Added
sdiff udiff text old ( 30492 ) new ( 30513 )
full compact
1/*-
2 * Copyright (c) 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley
6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension
7 * Support code is derived from software contributed to Berkeley
8 * by Atsushi Murai (amurai@spec.co.jp).

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)cd9660_vnops.c 8.19 (Berkeley) 5/27/95
39 * $Id: cd9660_vnops.c,v 1.45 1997/10/16 20:32:21 phk Exp $
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/namei.h>
45#include <sys/kernel.h>
46#include <sys/stat.h>
47#include <sys/sysctl.h>

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

64static int cd9660_read __P((struct vop_read_args *));
65struct isoreaddir;
66static int iso_uiodir __P((struct isoreaddir *idp, struct dirent *dp,
67 off_t off));
68static int iso_shipdir __P((struct isoreaddir *idp));
69static int cd9660_readdir __P((struct vop_readdir_args *));
70static int cd9660_readlink __P((struct vop_readlink_args *ap));
71static int cd9660_abortop __P((struct vop_abortop_args *));
72static int cd9660_strategy __P((struct vop_strategy_args *));
73static int cd9660_print __P((struct vop_print_args *));
74
75/*
76 * Setattr call. Only allowed for block and character special devices.
77 */
78int
79cd9660_setattr(ap)
80 struct vop_setattr_args /* {
81 struct vnodeop_desc *a_desc;

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

710 } */ *ap;
711{
712 if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
713 zfree(namei_zone, ap->a_cnp->cn_pnbuf);
714 return (0);
715}
716
717/*
718 * Calculate the logical to physical mapping if not done already,
719 * then call the device strategy routine.
720 */
721static int
722cd9660_strategy(ap)
723 struct vop_strategy_args /* {
724 struct buf *a_bp;
725 } */ *ap;

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

763 } */ *ap;
764{
765
766 printf("tag VT_ISOFS, isofs vnode\n");
767 return (0);
768}
769
770/*
771 * Return POSIX pathconf information applicable to cd9660 filesystems.
772 */
773int
774cd9660_pathconf(ap)
775 struct vop_pathconf_args /* {
776 struct vnode *a_vp;
777 int a_name;
778 register_t *a_retval;

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

814struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = {
815 { &vop_default_desc, (vop_t *) vn_default_error },
816 { &vop_abortop_desc, (vop_t *) cd9660_abortop },
817 { &vop_access_desc, (vop_t *) cd9660_access },
818 { &vop_bmap_desc, (vop_t *) cd9660_bmap },
819 { &vop_cachedlookup_desc, (vop_t *) cd9660_lookup },
820 { &vop_getattr_desc, (vop_t *) cd9660_getattr },
821 { &vop_inactive_desc, (vop_t *) cd9660_inactive },
822 { &vop_islocked_desc, (vop_t *) vop_stdislocked },
823 { &vop_lock_desc, (vop_t *) vop_stdlock },
824 { &vop_lookup_desc, (vop_t *) vfs_cache_lookup },
825 { &vop_pathconf_desc, (vop_t *) cd9660_pathconf },
826 { &vop_print_desc, (vop_t *) cd9660_print },
827 { &vop_read_desc, (vop_t *) cd9660_read },
828 { &vop_readdir_desc, (vop_t *) cd9660_readdir },
829 { &vop_readlink_desc, (vop_t *) cd9660_readlink },
830 { &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
831 { &vop_setattr_desc, (vop_t *) cd9660_setattr },
832 { &vop_strategy_desc, (vop_t *) cd9660_strategy },
833 { &vop_unlock_desc, (vop_t *) vop_stdunlock },
834 { NULL, NULL }
835};
836static struct vnodeopv_desc cd9660_vnodeop_opv_desc =
837 { &cd9660_vnodeop_p, cd9660_vnodeop_entries };
838VNODEOP_SET(cd9660_vnodeop_opv_desc);
839
840/*
841 * Special device vnode ops
842 */
843vop_t **cd9660_specop_p;
844struct vnodeopv_entry_desc cd9660_specop_entries[] = {
845 { &vop_default_desc, (vop_t *) spec_vnoperate },
846 { &vop_access_desc, (vop_t *) cd9660_access },
847 { &vop_getattr_desc, (vop_t *) cd9660_getattr },
848 { &vop_inactive_desc, (vop_t *) cd9660_inactive },
849 { &vop_islocked_desc, (vop_t *) vop_stdislocked },
850 { &vop_lock_desc, (vop_t *) vop_stdlock },
851 { &vop_print_desc, (vop_t *) cd9660_print },
852 { &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
853 { &vop_setattr_desc, (vop_t *) cd9660_setattr },
854 { &vop_unlock_desc, (vop_t *) vop_stdunlock },
855 { NULL, NULL }
856};
857static struct vnodeopv_desc cd9660_specop_opv_desc =
858 { &cd9660_specop_p, cd9660_specop_entries };
859VNODEOP_SET(cd9660_specop_opv_desc);
860
861vop_t **cd9660_fifoop_p;
862struct vnodeopv_entry_desc cd9660_fifoop_entries[] = {
863 { &vop_default_desc, (vop_t *) fifo_vnoperate },
864 { &vop_access_desc, (vop_t *) cd9660_access },
865 { &vop_getattr_desc, (vop_t *) cd9660_getattr },
866 { &vop_inactive_desc, (vop_t *) cd9660_inactive },
867 { &vop_islocked_desc, (vop_t *) vop_stdislocked },
868 { &vop_lock_desc, (vop_t *) vop_stdlock },
869 { &vop_print_desc, (vop_t *) cd9660_print },
870 { &vop_reclaim_desc, (vop_t *) cd9660_reclaim },
871 { &vop_setattr_desc, (vop_t *) cd9660_setattr },
872 { &vop_unlock_desc, (vop_t *) vop_stdunlock },
873 { NULL, NULL }
874};
875static struct vnodeopv_desc cd9660_fifoop_opv_desc =
876 { &cd9660_fifoop_p, cd9660_fifoop_entries };
877
878VNODEOP_SET(cd9660_fifoop_opv_desc);