diff options
author | dfr <dfr@FreeBSD.org> | 1994-09-09 11:11:01 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1994-09-09 11:11:01 +0000 |
commit | 8e7267d0ad27e997e960e1713ecb2978f52bf940 (patch) | |
tree | 11e1907931568db42ca369145a988db150c08f84 /sys/fs/cd9660/iso.h | |
parent | 07c3866a6e3d1bc84ae70e71b9dc5209d2c82321 (diff) | |
download | FreeBSD-src-8e7267d0ad27e997e960e1713ecb2978f52bf940.zip FreeBSD-src-8e7267d0ad27e997e960e1713ecb2978f52bf940.tar.gz |
Fixed some confusion between the size of a logical block and the size of a
device block which was stopping symbolic links working.
cd9660_readdir was incorrectly casting a pointer to the d_namlen field of a
struct dirent to a (u_short*) which caused the directory entries "." and ".."
to read incorrectly.
Submitted by: dfr
Diffstat (limited to 'sys/fs/cd9660/iso.h')
-rw-r--r-- | sys/fs/cd9660/iso.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/fs/cd9660/iso.h b/sys/fs/cd9660/iso.h index a329afa..04b9acc 100644 --- a/sys/fs/cd9660/iso.h +++ b/sys/fs/cd9660/iso.h @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)iso.h 8.2 (Berkeley) 1/23/94 - * $Id$ + * $Id: iso.h,v 1.2 1994/08/02 07:41:38 davidg Exp $ */ #define ISODCL(from, to) (to - from + 1) @@ -165,6 +165,9 @@ struct iso_mnt { #define iso_lblkno(imp, loc) ((loc) >> (imp)->im_bshift) #define iso_blksize(imp, ip, lbn) ((imp)->logical_block_size) #define iso_lblktosize(imp, blk) ((blk) << (imp)->im_bshift) +#define iso_lblktodaddr(imp, lbn) btodb(iso_lblktosize(imp, lbn)) +#define iso_dblkinc(imp, lbn) ((lbn) + iso_lblktodaddr(imp, 1)) +#define iso_dblkno(imp, loc) iso_lblktodaddr(imp, iso_lblkno(imp, loc)) int cd9660_mount __P((struct mount *, char *, caddr_t, struct nameidata *, struct proc *)); |