b_un.b_addr -> b_data

This commit is contained in:
mycroft 1994-06-14 23:54:44 +00:00
parent 0ae2853c67
commit 39f627ae40
5 changed files with 97 additions and 73 deletions

View File

@ -37,7 +37,7 @@
* *
* from: @(#)ufs_lookup.c 7.33 (Berkeley) 5/19/91 * from: @(#)ufs_lookup.c 7.33 (Berkeley) 5/19/91
* from: @(#)cd9660_lookup.c 8.2 (Berkeley) 1/23/94 * from: @(#)cd9660_lookup.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_lookup.c,v 1.1 1994/06/08 11:22:49 mycroft Exp $ * $Id: cd9660_lookup.c,v 1.2 1994/06/14 23:54:44 mycroft Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -250,7 +250,7 @@ searchloop:
* Get pointer to next entry. * Get pointer to next entry.
*/ */
ep = (struct iso_directory_record *) ep = (struct iso_directory_record *)
(bp->b_un.b_addr + entryoffsetinblock); (bp->b_data + entryoffsetinblock);
reclen = isonum_711 (ep->length); reclen = isonum_711 (ep->length);
if (reclen == 0) { if (reclen == 0) {
@ -341,8 +341,8 @@ foundino:
if (error = iso_blkatoff(dp, saveoffset, &bp)) if (error = iso_blkatoff(dp, saveoffset, &bp))
return (error); return (error);
} }
ep = (struct iso_directory_record *)(bp->b_un.b_addr ep = (struct iso_directory_record *)
+ iso_blkoff(imp,saveoffset)); (bp->b_data + iso_blkoff(imp,saveoffset));
dp->i_offset = saveoffset; dp->i_offset = saveoffset;
} }
goto found; goto found;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94 * from: @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_node.c,v 1.1 1994/06/08 11:22:51 mycroft Exp $ * $Id: cd9660_node.c,v 1.2 1994/06/14 23:55:04 mycroft Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -248,7 +248,7 @@ loop:
*ipp = 0; *ipp = 0;
return error; return error;
} }
isodir = (struct iso_directory_record *)bp->b_un.b_addr; isodir = (struct iso_directory_record *)bp->b_data;
} }
ip->iso_extent = isonum_733(isodir->extent); ip->iso_extent = isonum_733(isodir->extent);
@ -478,7 +478,7 @@ cd9660_defattr(isodir,inop,bp)
bp = bp2; bp = bp2;
} }
if (bp) { if (bp) {
ap = (struct iso_extended_attributes *)bp->b_un.b_addr; ap = (struct iso_extended_attributes *)bp->b_data;
if (isonum_711(ap->version) == 1) { if (isonum_711(ap->version) == 1) {
if (!(ap->perm[0]&0x40)) if (!(ap->perm[0]&0x40))
@ -528,7 +528,7 @@ cd9660_deftstamp(isodir,inop,bp)
bp = bp2; bp = bp2;
} }
if (bp) { if (bp) {
ap = (struct iso_extended_attributes *)bp->b_un.b_addr; ap = (struct iso_extended_attributes *)bp->b_data;
if (isonum_711(ap->version) == 1) { if (isonum_711(ap->version) == 1) {
if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime)) if (!cd9660_tstamp_conv17(ap->ftime,&inop->inode.iso_atime))

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)cd9660_rrip.c 8.2 (Berkeley) 1/23/94 * from: @(#)cd9660_rrip.c 8.2 (Berkeley) 1/23/94
* $Id: cd9660_rrip.c,v 1.1 1994/06/08 11:22:53 mycroft Exp $ * $Id: cd9660_rrip.c,v 1.2 1994/06/14 23:55:25 mycroft Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -529,7 +529,7 @@ cd9660_rrip_loop(isodir,ana,table)
ana->imp->logical_block_size,NOCRED,&bp)) ana->imp->logical_block_size,NOCRED,&bp))
/* what to do now? */ /* what to do now? */
break; break;
phead = (ISO_SUSP_HEADER *)(bp->b_un.b_addr + ana->iso_ce_off); phead = (ISO_SUSP_HEADER *)(bp->b_data + ana->iso_ce_off);
pend = (ISO_SUSP_HEADER *) ((char *)phead + ana->iso_ce_len); pend = (ISO_SUSP_HEADER *) ((char *)phead + ana->iso_ce_len);
} else } else
break; break;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)cd9660_vfsops.c 8.3 (Berkeley) 1/31/94 * from: @(#)cd9660_vfsops.c 8.3 (Berkeley) 1/31/94
* $Id: cd9660_vfsops.c,v 1.1 1994/06/08 11:22:57 mycroft Exp $ * $Id: cd9660_vfsops.c,v 1.2 1994/06/14 23:55:44 mycroft Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -263,7 +263,7 @@ static iso_mountfs(devvp, mp, p, argp)
iso_bsize, NOCRED, &bp)) iso_bsize, NOCRED, &bp))
goto out; goto out;
vdp = (struct iso_volume_descriptor *)bp->b_un.b_addr; vdp = (struct iso_volume_descriptor *)bp->b_data;
if (bcmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) != 0) { if (bcmp (vdp->id, ISO_STANDARD_ID, sizeof vdp->id) != 0) {
error = EINVAL; error = EINVAL;
goto out; goto out;
@ -332,7 +332,7 @@ static iso_mountfs(devvp, mp, p, argp)
isomp->logical_block_size,NOCRED,&bp)) isomp->logical_block_size,NOCRED,&bp))
goto out; goto out;
rootp = (struct iso_directory_record *)bp->b_un.b_addr; rootp = (struct iso_directory_record *)bp->b_data;
if ((isomp->rr_skip = cd9660_rrip_offset(rootp,isomp)) < 0) { if ((isomp->rr_skip = cd9660_rrip_offset(rootp,isomp)) < 0) {
argp->flags |= ISOFSMNT_NORRIP; argp->flags |= ISOFSMNT_NORRIP;
@ -616,7 +616,7 @@ cd9660_fhtovp(mp, fhp, nam, vpp, exflagsp, credanonp)
return (error); return (error);
} }
dirp = (struct iso_directory_record *)(bp->b_un.b_addr + off); dirp = (struct iso_directory_record *)(bp->b_data + off);
if (off + isonum_711(dirp->length) > imp->logical_block_size) { if (off + isonum_711(dirp->length) > imp->logical_block_size) {
brelse(bp); brelse(bp);
printf("fhtovp: directory crosses block boundary %d[off=%d/len=%d]\n", printf("fhtovp: directory crosses block boundary %d[off=%d/len=%d]\n",

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* from: @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94 * from: @(#)cd9660_vnops.c 8.3 (Berkeley) 1/23/94
* $Id: cd9660_vnops.c,v 1.1 1994/06/08 11:22:58 mycroft Exp $ * $Id: cd9660_vnops.c,v 1.2 1994/06/14 23:56:02 mycroft Exp $
*/ */
#include <sys/param.h> #include <sys/param.h>
@ -166,26 +166,50 @@ cd9660_access(ap)
struct proc *a_p; struct proc *a_p;
} */ *ap; } */ *ap;
{ {
register struct iso_node *ip = VTOI(ap->a_vp); struct iso_node *ip = VTOI(ap->a_vp);
register int mode = ap->a_mode;
struct ucred *cred = ap->a_cred; struct ucred *cred = ap->a_cred;
register gid_t *gp; mode_t mask, mode = ap->a_mode;
gid_t *gp;
int i; int i;
/* User id 0 always gets access. */
if (cred->cr_uid == 0) if (cred->cr_uid == 0)
return (0); return (0);
if (cred->cr_uid != ip->inode.iso_uid) { mask = 0;
mode >>= 3;
gp = cred->cr_groups; /* Otherwise, check the owner. */
for (i = 0; i < cred->cr_ngroups; i++, gp++) if (cred->cr_uid == ip->inode.iso_uid) {
if (ip->inode.iso_gid == *gp) if (mode & VEXEC)
goto found; mask |= S_IXUSR;
mode >>= 3; if (mode & VREAD)
found: mask |= S_IRUSR;
if (mode & VWRITE)
mask |= S_IWUSR;
return ((ip->inode.iso_mode & mask) == mask ? 0 : EACCES);
} }
return ((ip->inode.iso_mode & mode) == mode ? 0 : EACCES); /* Otherwise, check the groups. */
for (i = 0, gp = cred->cr_groups; i < cred->cr_ngroups; i++, gp++)
if (ip->inode.iso_gid == *gp) {
if (mode & VEXEC)
mask |= S_IXGRP;
if (mode & VREAD)
mask |= S_IRGRP;
if (mode & VWRITE)
mask |= S_IWGRP;
return ((ip->inode.iso_mode & mask) == mask ?
0 : EACCES);
}
/* Otherwise, check everyone else. */
if (mode & VEXEC)
mask |= S_IXOTH;
if (mode & VREAD)
mask |= S_IROTH;
if (mode & VWRITE)
mask |= S_IWOTH;
return ((ip->inode.iso_mode & mask) == mask ? 0 : EACCES);
} }
cd9660_getattr(ap) cd9660_getattr(ap)
@ -295,7 +319,7 @@ cd9660_read(ap)
return (error); return (error);
} }
error = uiomove(bp->b_un.b_addr + on, (int)n, uio); error = uiomove(bp->b_data + on, (int)n, uio);
if (n + on == imp->logical_block_size || if (n + on == imp->logical_block_size ||
uio->uio_offset == (off_t)ip->i_size) uio->uio_offset == (off_t)ip->i_size)
bp->b_flags |= B_AGE; bp->b_flags |= B_AGE;
@ -543,7 +567,7 @@ cd9660_readdir(ap)
*/ */
ep = (struct iso_directory_record *) ep = (struct iso_directory_record *)
(bp->b_un.b_addr + entryoffsetinblock); (bp->b_data + entryoffsetinblock);
reclen = isonum_711 (ep->length); reclen = isonum_711 (ep->length);
if (reclen == 0) { if (reclen == 0) {
@ -686,7 +710,7 @@ cd9660_readlink(ap)
/* /*
* Setup the directory pointer for this inode * Setup the directory pointer for this inode
*/ */
dirp = (ISODIR *)(bp->b_un.b_addr + (ip->i_number & imp->im_bmask)); dirp = (ISODIR *)(bp->b_data + (ip->i_number & imp->im_bmask));
#ifdef DEBUG #ifdef DEBUG
printf("lbn=%d,off=%d,bsize=%d,DEV_BSIZE=%d, dirp= %08x, b_addr=%08x, offset=%08x(%08x)\n", printf("lbn=%d,off=%d,bsize=%d,DEV_BSIZE=%d, dirp= %08x, b_addr=%08x, offset=%08x(%08x)\n",
(daddr_t)(ip->i_number >> imp->im_bshift), (daddr_t)(ip->i_number >> imp->im_bshift),
@ -694,7 +718,7 @@ cd9660_readlink(ap)
imp->logical_block_size, imp->logical_block_size,
DEV_BSIZE, DEV_BSIZE,
dirp, dirp,
bp->b_un.b_addr, bp->b_data,
ip->i_number, ip->i_number,
ip->i_number & imp->im_bmask ); ip->i_number & imp->im_bmask );
#endif #endif