diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-02-15 02:15:32 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-02-15 02:15:32 +0000 |
commit | 86464aed71025541805e7b1515541aee89879e33 (patch) | |
tree | e01a457a4912a8553bc65524aa3125d51f29f810 /fs/isofs | |
parent | 88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff) |
Merge with Linux 2.2.1.
Diffstat (limited to 'fs/isofs')
-rw-r--r-- | fs/isofs/inode.c | 38 | ||||
-rw-r--r-- | fs/isofs/namei.c | 6 |
2 files changed, 27 insertions, 17 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 26c72dab9..049a0cc15 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c @@ -409,11 +409,13 @@ static unsigned int isofs_get_last_session(kdev_t dev) struct cdrom_multisession ms_info; unsigned int vol_desc_start; struct inode inode_fake; + struct file_operations *fops; extern struct file_operations * get_blkfops(unsigned int); int i; vol_desc_start=0; - if (get_blkfops(MAJOR(dev))->ioctl!=NULL) + fops = get_blkfops(MAJOR(dev)); + if (fops && fops->ioctl) { /* Whoops. We must save the old FS, since otherwise * we would destroy the kernels idea about FS on root @@ -536,17 +538,10 @@ struct super_block *isofs_read_super(struct super_block *s, void *data, vdp = (struct iso_volume_descriptor *)bh->b_data; hdp = (struct hs_volume_descriptor *)bh->b_data; - if (strncmp (hdp->id, HS_STANDARD_ID, sizeof hdp->id) == 0) { - if (isonum_711 (hdp->type) != ISO_VD_PRIMARY) - goto out_freebh; - - s->u.isofs_sb.s_high_sierra = 1; - high_sierra = 1; - opt.rock = 'n'; - h_pri = (struct hs_primary_descriptor *)vdp; - goto root_found; - } - + /* Due to the overlapping physical location of the descriptors, + * ISO CDs can match hdp->id==HS_STANDARD_ID as well. To ensure + * proper identification in this case, we first check for ISO. + */ if (strncmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) == 0) { if (isonum_711 (vdp->type) == ISO_VD_END) break; @@ -580,9 +575,21 @@ struct super_block *isofs_read_super(struct super_block *s, void *data, } } #endif - /* Just skip any volume descriptors we don't recognize */ + } else { + if (strncmp (hdp->id, HS_STANDARD_ID, sizeof hdp->id) == 0) { + if (isonum_711 (hdp->type) != ISO_VD_PRIMARY) + goto out_freebh; + + s->u.isofs_sb.s_high_sierra = 1; + high_sierra = 1; + opt.rock = 'n'; + h_pri = (struct hs_primary_descriptor *)vdp; + goto root_found; + } } + /* Just skip any volume descriptors we don't recognize */ + brelse(bh); bh = NULL; } @@ -1105,8 +1112,9 @@ void isofs_read_inode(struct inode * inode) } /* There are defective discs out there - we do this to protect - ourselves. A cdrom will never contain more than 800Mb */ - if((inode->i_size < 0 || inode->i_size > 800000000) && + ourselves. A cdrom will never contain more than 800Mb + .. but a DVD may be up to 1Gig (Ulrich Habel) */ + if((inode->i_size < 0 || inode->i_size > 1073741824) && inode->i_sb->u.isofs_sb.s_cruft == 'n') { printk("Warning: defective cdrom. Enabling \"cruft\" mount option.\n"); inode->i_sb->u.isofs_sb.s_cruft = 'y'; diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c index 5891b493e..364698dc2 100644 --- a/fs/isofs/namei.c +++ b/fs/isofs/namei.c @@ -161,6 +161,7 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino) if (dir->i_sb->u.isofs_sb.s_rock || dir->i_sb->u.isofs_sb.s_joliet_level || + dir->i_sb->u.isofs_sb.s_mapping == 'n' || dir->i_sb->u.isofs_sb.s_mapping == 'a') { if (! page) { page = (unsigned char *) @@ -190,12 +191,13 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino) break; } if (c == ';') c = '.'; - dpnt[i] = c; + page[i] = c; } /* This allows us to match with and without * a trailing period. */ - if(dpnt[dlen-1] == '.' && dentry->d_name.len == dlen-1) + if(page[dlen-1] == '.' && dentry->d_name.len == dlen-1) dlen--; + dpnt = page; } /* * Skip hidden or associated files unless unhide is set |