diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-01-25 04:50:21 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2002-01-25 04:50:21 +0000 |
commit | 80641731b7e56ad5176b6b47a66b4f1750503aae (patch) | |
tree | ad8ad2367fb0414eafb933f6a9f785b7dfc04bf4 | |
parent | f4d8d32b88620769d747ec8f5f75e5b4981bd8ce (diff) |
multi-session support; from NetBSD. millert@ ok
this only affects iso_mountfs(), not disklabel. code for it may be added
later.
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index f91662cc09f..018a4ab2404 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.27 2001/12/19 08:58:06 art Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.28 2002/01/25 04:50:20 fgsch Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -53,6 +53,8 @@ #include <sys/file.h> #include <sys/disklabel.h> #include <sys/ioctl.h> +#include <sys/cdio.h> +#include <sys/conf.h> #include <sys/errno.h> #include <sys/malloc.h> #include <sys/stat.h> @@ -238,6 +240,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; if (!ronly) return (EROFS); @@ -265,11 +268,16 @@ iso_mountfs(devvp, mp, p, argp) * 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) + sess = 0; joliet_level = 0; for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) { - if ((error = bread(devvp, iso_blknum * btodb(iso_bsize), - iso_bsize, NOCRED, &bp)) != 0) + if ((error = bread(devvp, + (iso_blknum + sess) * btodb(iso_bsize), + iso_bsize, NOCRED, &bp)) != 0) goto out; vdp = (struct iso_volume_descriptor *)bp->b_data; |