1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-23 11:18:54 +00:00

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.
This commit is contained in:
Scott Long 2003-05-04 07:39:11 +00:00
parent 6e11162c7b
commit 1830bca169
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114651

View File

@ -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: