From c35e8e54cdb009e5630ca3cd4f80d51c85097f44 Mon Sep 17 00:00:00 2001 From: Boris Popov Date: Sun, 11 Mar 2001 10:05:08 +0000 Subject: [PATCH] Add a mount time option which slightly relaxes checks for valid Joilet extensions. PR: kern/23315 Reviewed by: adrian --- sys/fs/cd9660/cd9660_mount.h | 1 + sys/fs/cd9660/cd9660_vfsops.c | 3 ++- sys/isofs/cd9660/cd9660_mount.h | 1 + sys/isofs/cd9660/cd9660_vfsops.c | 3 ++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/fs/cd9660/cd9660_mount.h b/sys/fs/cd9660/cd9660_mount.h index 5263912d529..8cc6a8655fa 100644 --- a/sys/fs/cd9660/cd9660_mount.h +++ b/sys/fs/cd9660/cd9660_mount.h @@ -52,3 +52,4 @@ struct iso_args { #define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */ #define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */ #define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet Ext.*/ +#define ISOFSMNT_BROKENJOLIET 0x00000010/* allow broken Joliet disks */ diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 606f9d37941..e73fb7efdc5 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -355,7 +355,8 @@ iso_mountfs(devvp, mp, p, argp) if (bcmp(sup->escape, "%/E", 3) == 0) joliet_level = 3; - if (isonum_711 (sup->flags) & 1) + if ((isonum_711 (sup->flags) & 1) && + (argp->flags & ISOFSMNT_BROKENJOLIET) == 0) joliet_level = 0; } } diff --git a/sys/isofs/cd9660/cd9660_mount.h b/sys/isofs/cd9660/cd9660_mount.h index 5263912d529..8cc6a8655fa 100644 --- a/sys/isofs/cd9660/cd9660_mount.h +++ b/sys/isofs/cd9660/cd9660_mount.h @@ -52,3 +52,4 @@ struct iso_args { #define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */ #define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */ #define ISOFSMNT_NOJOLIET 0x00000008 /* disable Joliet Ext.*/ +#define ISOFSMNT_BROKENJOLIET 0x00000010/* allow broken Joliet disks */ diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index 606f9d37941..e73fb7efdc5 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -355,7 +355,8 @@ iso_mountfs(devvp, mp, p, argp) if (bcmp(sup->escape, "%/E", 3) == 0) joliet_level = 3; - if (isonum_711 (sup->flags) & 1) + if ((isonum_711 (sup->flags) & 1) && + (argp->flags & ISOFSMNT_BROKENJOLIET) == 0) joliet_level = 0; } }