summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/isofs/cd9660/cd9660_vfsops.c21
-rw-r--r--sys/sys/mount.h13
2 files changed, 23 insertions, 11 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c
index 95a2d6f45a3..ed51eaf31cb 100644
--- a/sys/isofs/cd9660/cd9660_vfsops.c
+++ b/sys/isofs/cd9660/cd9660_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vfsops.c,v 1.42 2006/08/07 15:50:42 pedro Exp $ */
+/* $OpenBSD: cd9660_vfsops.c,v 1.43 2007/03/21 13:44:04 pedro Exp $ */
/* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */
/*-
@@ -236,7 +236,7 @@ iso_mountfs(devvp, mp, p, argp)
struct iso_supplementary_descriptor *sup = NULL;
struct iso_directory_record *rootp;
int logical_block_size;
- int sess = 0;
+ int sess;
if (!ronly)
return (EROFS);
@@ -259,16 +259,25 @@ iso_mountfs(devvp, mp, p, argp)
return (error);
needclose = 1;
- /* This is the "logical sector size". The standard says this
+ /*
+ * This is the "logical sector size". The standard says this
* should be 2048 or the physical sector size on the device,
* whichever is greater. For now, we'll just use a constant.
*/
iso_bsize = ISO_DEFAULT_BLOCK_SIZE;
- error = VOP_IOCTL(devvp, CDIOREADMSADDR, (caddr_t)&sess, 0, FSCRED, p);
- if (error)
+ if (argp->flags & ISOFSMNT_SESS) {
+ sess = argp->sess;
+ if (sess < 0)
+ sess = 0;
+ } else {
sess = 0;
-
+ error = VOP_IOCTL(devvp, CDIOREADMSADDR, (caddr_t)&sess, 0,
+ FSCRED, p);
+ if (error)
+ sess = 0;
+ }
+
joliet_level = 0;
for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) {
if ((error = bread(devvp,
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index ea848a7ddb3..20a2a013629 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount.h,v 1.77 2006/12/15 03:04:24 krw Exp $ */
+/* $OpenBSD: mount.h,v 1.78 2007/03/21 13:44:04 pedro Exp $ */
/* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */
/*
@@ -94,11 +94,14 @@ struct iso_args {
char *fspec; /* block special device to mount */
struct export_args export_info;/* network export info */
int flags; /* mounting flags, see below */
+ int sess; /* start sector of session */
};
-#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
-#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
-#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */
-#define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet Ext.*/
+
+#define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/
+#define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */
+#define ISOFSMNT_EXTATT 0x00000004 /* enable extended attr. */
+#define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet Ext.*/
+#define ISOFSMNT_SESS 0x00000010 /* use iso_args.sess */
/*
* Arguments to mount NFS