use a cast b_data for everything
This commit is contained in:
parent
3ece2ea12e
commit
90cea1534d
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ufs_alloc.c 7.26 (Berkeley) 5/2/91
|
||||
* $Id: ufs_alloc.c,v 1.5 1994/03/27 09:10:17 cgd Exp $
|
||||
* $Id: ufs_alloc.c,v 1.6 1994/05/18 10:21:42 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -544,7 +544,7 @@ fragextend(ip, cg, bprev, osize, nsize)
|
|||
brelse(bp);
|
||||
return (NULL);
|
||||
}
|
||||
cgp = bp->b_un.b_cg;
|
||||
cgp = (struct cg *)bp->b_data;
|
||||
if (!cg_chkmagic(cgp)) {
|
||||
brelse(bp);
|
||||
return (NULL);
|
||||
|
@ -607,7 +607,7 @@ alloccg(ip, cg, bpref, size)
|
|||
brelse(bp);
|
||||
return (NULL);
|
||||
}
|
||||
cgp = bp->b_un.b_cg;
|
||||
cgp = (struct cg *)bp->b_data;
|
||||
if (!cg_chkmagic(cgp) ||
|
||||
(cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) {
|
||||
brelse(bp);
|
||||
|
@ -808,7 +808,7 @@ ialloccg(ip, cg, ipref, mode)
|
|||
brelse(bp);
|
||||
return (NULL);
|
||||
}
|
||||
cgp = bp->b_un.b_cg;
|
||||
cgp = (struct cg *)bp->b_data;
|
||||
if (!cg_chkmagic(cgp) || cgp->cg_cs.cs_nifree == 0) {
|
||||
brelse(bp);
|
||||
return (NULL);
|
||||
|
@ -897,7 +897,7 @@ blkfree(ip, bno, size)
|
|||
brelse(bp);
|
||||
return;
|
||||
}
|
||||
cgp = bp->b_un.b_cg;
|
||||
cgp = (struct cg *)bp->b_data;
|
||||
if (!cg_chkmagic(cgp)) {
|
||||
brelse(bp);
|
||||
return;
|
||||
|
@ -992,7 +992,7 @@ ifree(ip, ino, mode)
|
|||
brelse(bp);
|
||||
return;
|
||||
}
|
||||
cgp = bp->b_un.b_cg;
|
||||
cgp = (struct cg *)bp->b_data;
|
||||
if (!cg_chkmagic(cgp)) {
|
||||
brelse(bp);
|
||||
return;
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ufs_vfsops.c 7.56 (Berkeley) 6/28/91
|
||||
* $Id: ufs_vfsops.c,v 1.16 1994/05/18 00:35:13 cgd Exp $
|
||||
* $Id: ufs_vfsops.c,v 1.17 1994/05/18 10:21:49 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -243,7 +243,7 @@ mountfs(devvp, mp, p)
|
|||
}
|
||||
if (error = bread(devvp, SBOFF / size, SBSIZE, NOCRED, &bp))
|
||||
goto out;
|
||||
fs = bp->b_un.b_fs;
|
||||
fs = (struct fs *)bp->b_data;
|
||||
if (fs->fs_magic != FS_MAGIC || fs->fs_bsize > MAXBSIZE ||
|
||||
fs->fs_bsize < sizeof(struct fs)) {
|
||||
error = EINVAL; /* XXX needs translation */
|
||||
|
@ -605,7 +605,7 @@ sbupdate(mp, waitfor)
|
|||
bcopy((caddr_t)fs, bp->b_un.b_addr, (u_int)fs->fs_sbsize);
|
||||
/* Restore compatibility to old file systems. XXX */
|
||||
if (fs->fs_postblformat == FS_42POSTBLFMT) /* XXX */
|
||||
bp->b_un.b_fs->fs_nrpos = -1; /* XXX */
|
||||
((struct fs *)bp->b_data)->fs_nrpos = -1; /* XXX */
|
||||
if (waitfor == MNT_WAIT)
|
||||
error = bwrite(bp);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue