summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r--sys/fs/cd9660/cd9660_vfsops.c34
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c29
-rw-r--r--sys/fs/cd9660/iso.h7
3 files changed, 36 insertions, 34 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index 8f94c6a..319b192 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -75,7 +75,6 @@ static vfs_root_t cd9660_root;
static vfs_statfs_t cd9660_statfs;
static vfs_vget_t cd9660_vget;
static vfs_fhtovp_t cd9660_fhtovp;
-static vfs_vptofh_t cd9660_vptofh;
static struct vfsops cd9660_vfsops = {
.vfs_fhtovp = cd9660_fhtovp,
@@ -85,7 +84,6 @@ static struct vfsops cd9660_vfsops = {
.vfs_statfs = cd9660_statfs,
.vfs_unmount = cd9660_unmount,
.vfs_vget = cd9660_vget,
- .vfs_vptofh = cd9660_vptofh,
};
VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY);
MODULE_VERSION(cd9660, 1);
@@ -595,13 +593,6 @@ cd9660_statfs(mp, sbp, td)
* - check that the generation number matches
*/
-struct ifid {
- u_short ifid_len;
- u_short ifid_pad;
- int ifid_ino;
- long ifid_start;
-};
-
/* ARGSUSED */
static int
cd9660_fhtovp(mp, fhp, vpp)
@@ -821,28 +812,3 @@ cd9660_vget_internal(mp, ino, flags, vpp, relocated, isodir)
*vpp = vp;
return (0);
}
-
-/*
- * Vnode pointer to File handle
- */
-/* ARGSUSED */
-static int
-cd9660_vptofh(vp, fhp)
- struct vnode *vp;
- struct fid *fhp;
-{
- struct iso_node *ip = VTOI(vp);
- struct ifid *ifhp;
-
- ifhp = (struct ifid *)fhp;
- ifhp->ifid_len = sizeof(struct ifid);
-
- ifhp->ifid_ino = ip->i_number;
- ifhp->ifid_start = ip->iso_start;
-
-#ifdef ISOFS_DBG
- printf("vptofh: ino %d, start %ld\n",
- ifhp->ifid_ino,ifhp->ifid_start);
-#endif
- return 0;
-}
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c
index 1cbfaee..ab6fea8 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -74,6 +74,7 @@ static int iso_shipdir(struct isoreaddir *idp);
static vop_readdir_t cd9660_readdir;
static vop_readlink_t cd9660_readlink;
static vop_strategy_t cd9660_strategy;
+static vop_vptofh_t cd9660_vptofh;
/*
* Setattr call. Only allowed for block and character special devices.
@@ -798,6 +799,32 @@ cd9660_pathconf(ap)
}
/*
+ * Vnode pointer to File handle
+ */
+static int
+cd9660_vptofh(ap)
+ struct vop_vptofh_args /* {
+ struct vnode *a_vp;
+ struct fid *a_fhp;
+ } */ *ap;
+{
+ struct iso_node *ip = VTOI(ap->a_vp);
+ struct ifid *ifhp;
+
+ ifhp = (struct ifid *)ap->a_fhp;
+ ifhp->ifid_len = sizeof(struct ifid);
+
+ ifhp->ifid_ino = ip->i_number;
+ ifhp->ifid_start = ip->iso_start;
+
+#ifdef ISOFS_DBG
+ printf("vptofh: ino %d, start %ld\n",
+ ifhp->ifid_ino,ifhp->ifid_start);
+#endif
+ return 0;
+}
+
+/*
* Global vfs data structures for cd9660
*/
struct vop_vector cd9660_vnodeops = {
@@ -817,6 +844,7 @@ struct vop_vector cd9660_vnodeops = {
.vop_reclaim = cd9660_reclaim,
.vop_setattr = cd9660_setattr,
.vop_strategy = cd9660_strategy,
+ .vop_vptofh = cd9660_vptofh,
};
/*
@@ -830,4 +858,5 @@ struct vop_vector cd9660_fifoops = {
.vop_inactive = cd9660_inactive,
.vop_reclaim = cd9660_reclaim,
.vop_setattr = cd9660_setattr,
+ .vop_vptofh = cd9660_vptofh,
};
diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h
index 0851341..0988bf6 100644
--- a/sys/fs/cd9660/iso.h
+++ b/sys/fs/cd9660/iso.h
@@ -249,6 +249,13 @@ struct iso_mnt {
void *im_l2d;
};
+struct ifid {
+ u_short ifid_len;
+ u_short ifid_pad;
+ int ifid_ino;
+ long ifid_start;
+};
+
#define VFSTOISOFS(mp) ((struct iso_mnt *)((mp)->mnt_data))
#define blkoff(imp, loc) ((loc) & (imp)->im_bmask)
OpenPOWER on IntegriCloud