mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-12 14:29:28 +00:00
Catch up with recent gcc changes and introduce a DIP_SET macro
to use when setting values that depend on the UFS version. Raise WARNS again.
This commit is contained in:
parent
d10ab05ebd
commit
691ae40438
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132832
@ -10,7 +10,7 @@ PROG= growfs
|
||||
SRCS= growfs.c
|
||||
MAN= growfs.8
|
||||
|
||||
WARNS?= 0
|
||||
WARNS?= 6
|
||||
|
||||
.if defined(GFSDBG)
|
||||
SRCS+= debug.c
|
||||
|
@ -110,6 +110,12 @@ union dinode {
|
||||
#define DIP(dp, field) \
|
||||
((sblock.fs_magic == FS_UFS1_MAGIC) ? \
|
||||
(uint32_t)(dp)->dp1.field : (dp)->dp2.field)
|
||||
#define DIP_SET(dp, field, val) do { \
|
||||
if (sblock.fs_magic == FS_UFS1_MAGIC) \
|
||||
(dp)->dp1.field = (val); \
|
||||
else \
|
||||
(dp)->dp2.field = (val); \
|
||||
} while (0)
|
||||
static ufs2_daddr_t inoblk; /* inode block address */
|
||||
static char inobuf[MAXBSIZE]; /* inode block */
|
||||
ino_t maxino; /* last valid inode */
|
||||
@ -2420,7 +2426,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
|
||||
if (iptr == 0)
|
||||
continue;
|
||||
if (cond_bl_upd(&iptr, bp, fsi, fso, Nflag)) {
|
||||
DIP(ino, di_db[i]) = iptr;
|
||||
DIP_SET(ino, di_db[i], iptr);
|
||||
inodeupdated++;
|
||||
}
|
||||
}
|
||||
@ -2434,7 +2440,7 @@ updrefs(int cg, ino_t in, struct gfs_bpp *bp, int fsi, int fso, unsigned int
|
||||
if (iptr == 0)
|
||||
continue;
|
||||
if (cond_bl_upd(&iptr, bp, fsi, fso, Nflag)) {
|
||||
DIP(ino, di_ib[i]) = iptr;
|
||||
DIP_SET(ino, di_ib[i], iptr);
|
||||
inodeupdated++;
|
||||
}
|
||||
indirchk(blksperindir, lbn, iptr, numblks, bp, fsi, fso, Nflag);
|
||||
|
Loading…
Reference in New Issue
Block a user