patch-1.3.88 linux/fs/isofs/inode.c
Next file: linux/fs/isofs/namei.c
Previous file: linux/drivers/sound/sscape.c
Back to the patch index
Back to the overall index
- Lines: 74
- Date:
Sat Apr 13 11:21:38 1996
- Orig file:
v1.3.87/linux/fs/isofs/inode.c
- Orig date:
Sun Mar 24 14:07:42 1996
diff -u --recursive --new-file v1.3.87/linux/fs/isofs/inode.c linux/fs/isofs/inode.c
@@ -430,7 +430,7 @@
struct statfs tmp;
tmp.f_type = ISOFS_SUPER_MAGIC;
- tmp.f_bsize = 1 << ISOFS_BLOCK_BITS;
+ tmp.f_bsize = sb->s_blocksize;
tmp.f_blocks = sb->u.isofs_sb.s_nzones;
tmp.f_bfree = 0;
tmp.f_bavail = 0;
@@ -681,7 +681,7 @@
struct iso_directory_record * de;
offset = 0;
- block = extent << (ISOFS_BLOCK_BITS - bufbits);
+ block = extent << (ISOFS_ZONE_BITS(parent) - bufbits);
if (!(bh = bread(parent->i_dev, block, bufsize))) return -1;
while (1 == 1) {
@@ -689,6 +689,7 @@
if (*((unsigned char *) de) == 0)
{
brelse(bh);
+ printk("Directory .. not found\n");
return -1;
}
@@ -718,9 +719,11 @@
result = -1;
offset = 0;
- block = parent_dir << (ISOFS_BLOCK_BITS - bufbits);
+ block = parent_dir << (ISOFS_ZONE_BITS(parent) - bufbits);
if (!block || !(bh = bread(parent->i_dev,block, bufsize)))
+ {
return -1;
+ }
for(;;)
{
@@ -738,11 +741,19 @@
block++;
directory_size -= bufsize;
if(directory_size < 0) return -1;
- if((block & 1) && (ISOFS_BLOCK_BITS - bufbits))
- return -1;
+ if((block & 1) && (ISOFS_ZONE_BITS(parent) - bufbits) == 1)
+ {
+ return -1;
+ }
+ if((block & 3) && (ISOFS_ZONE_BITS(parent) - bufbits) == 2)
+ {
+ return -1;
+ }
if (!block
|| !(bh = bread(parent->i_dev,block, bufsize)))
+ {
return -1;
+ }
continue;
}
@@ -764,7 +775,11 @@
brelse(bh);
offset -= bufsize;
directory_size -= bufsize;
- if(directory_size < 0) return -1;
+ if(directory_size < 0)
+ {
+ printk("Directory size < 0\n");
+ return -1;
+ }
block++;
if(!(bh = bread(parent->i_dev,block,bufsize))) {
kfree(cpnt);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this