diff options
author | grehan <grehan@FreeBSD.org> | 2005-08-14 04:19:36 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2005-08-14 04:19:36 +0000 |
commit | ba88fd3c57f9a076314a2ecd02b79ee6d3ef656f (patch) | |
tree | 4bbc73ccdac27752f56003f4432e80d86896f9e2 /sys/fs | |
parent | 40bd0121f595d5f830cee989fc05bda78f421829 (diff) | |
download | FreeBSD-src-ba88fd3c57f9a076314a2ecd02b79ee6d3ef656f.zip FreeBSD-src-ba88fd3c57f9a076314a2ecd02b79ee6d3ef656f.tar.gz |
- restore the ability to mount cd9660 filesystems as root by inverting
some of the options test, specifically the joliet and rockridge tests.
Since the root mount callchain doesn't go through cd9660_cmount, the
default mount options aren't set. Rather than having the main codepath
assume the options are there, test for the absence of the inverted
optioin
e.g. instead of vfs_flagopt(.. "joliet" ..), test for
!vfs_flagopt(.. "nojoliet" ..)
This works for root mount, non-root mount and future nmount cases.
- in cd9660_cmount, remove inadvertent setting of "gens" when "extatt"
was set.
Reported by: grehan, Dario Freni <saturnero at freesbie org>
Tested by: Dario Freni
Not objected to by: phk
MFC after: 3 days
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index db5ecc6..cd7e375 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -118,7 +118,6 @@ cd9660_cmount(struct mntarg *ma, void *data, int flags, struct thread *td) ma = mount_argb(ma, args.flags & ISOFSMNT_BROKENJOLIET, "nobrokenjoliet"); ma = mount_argb(ma, args.flags & ISOFSMNT_KICONV, "nokiconv"); - ma = mount_argb(ma, args.flags & ISOFSMNT_EXTATT, "nogens"); error = kernel_mount(ma, flags); @@ -288,7 +287,7 @@ iso_mountfs(devvp, mp, td) bp = NULL; sup = (struct iso_supplementary_descriptor *)vdp; - if (vfs_flagopt(mp->mnt_optnew, "joliet", NULL, 0)) { + if (!vfs_flagopt(mp->mnt_optnew, "nojoliet", NULL, 0)) { if (bcmp(sup->escape, "%/@", 3) == 0) joliet_level = 1; if (bcmp(sup->escape, "%/C", 3) == 0) @@ -379,14 +378,14 @@ iso_mountfs(devvp, mp, td) isomp->im_dev = dev; isomp->im_devvp = devvp; - vfs_flagopt(mp->mnt_optnew, "rrip", &isomp->im_flags, ISOFSMNT_NORRIP); + vfs_flagopt(mp->mnt_optnew, "norrip", &isomp->im_flags, ISOFSMNT_NORRIP); vfs_flagopt(mp->mnt_optnew, "gens", &isomp->im_flags, ISOFSMNT_GENS); vfs_flagopt(mp->mnt_optnew, "extatt", &isomp->im_flags, ISOFSMNT_EXTATT); - vfs_flagopt(mp->mnt_optnew, "joliet", &isomp->im_flags, ISOFSMNT_NOJOLIET); + vfs_flagopt(mp->mnt_optnew, "nojoliet", &isomp->im_flags, ISOFSMNT_NOJOLIET); vfs_flagopt(mp->mnt_optnew, "kiconv", &isomp->im_flags, ISOFSMNT_KICONV); - isomp->im_flags ^= (ISOFSMNT_NORRIP | ISOFSMNT_NOJOLIET); - /* Check the Rock Ridge Extention support */ - if (vfs_flagopt(mp->mnt_optnew, "rrip", NULL, 0)) { + + /* Check the Rock Ridge Extension support */ + if (!(isomp->im_flags & ISOFSMNT_NORRIP)) { if ((error = bread(isomp->im_devvp, (isomp->root_extent + isonum_711(rootp->ext_attr_length)) << (isomp->im_bshift - DEV_BSHIFT), |