diff options
author | scottl <scottl@FreeBSD.org> | 2003-05-04 07:39:11 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-05-04 07:39:11 +0000 |
commit | 8ab5276136e17b2031ec58d46b60b9aa3d31970c (patch) | |
tree | 5ef2b4a8bfe5591afded0ea9a7baebf2461ad57e /sys | |
parent | 3d16e172aec07b8f10e2136695f0a8adee45715f (diff) | |
download | FreeBSD-src-8ab5276136e17b2031ec58d46b60b9aa3d31970c.zip FreeBSD-src-8ab5276136e17b2031ec58d46b60b9aa3d31970c.tar.gz |
Correctly calculate the size of the extent that should be read in
udf_readatoffset(). This should fixe problems with reading udf filesystems
created with mkisofs.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/fs/udf/udf_vnops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 848bb5c..5827483 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -1074,7 +1074,7 @@ udf_readatoffset(struct udf_node *node, int *size, int offset, struct buf **bp, *size = min(*size, MAXBSIZE); if ((error = udf_readlblks(udfmp, sector, *size, bp))) { - printf("udf_readlblks returned %d\n", error); + printf("warning: udf_readlblks returned error %d\n", error); return (error); } @@ -1138,7 +1138,7 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3 lsector = (offset >> udfmp->bshift) + ((struct short_ad *)(icb))->pos; - *max_size = GETICBLEN(short_ad, icb) - offset; + *max_size = GETICBLEN(short_ad, icb); break; case 1: @@ -1162,7 +1162,7 @@ udf_bmap_internal(struct udf_node *node, uint32_t offset, daddr_t *sector, uint3 lsector = (offset >> udfmp->bshift) + ((struct long_ad *)(icb))->loc.lb_num; - *max_size = GETICBLEN(long_ad, icb) - offset; + *max_size = GETICBLEN(long_ad, icb); break; case 3: |