Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147732883
D6118.id15810.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6118.id15810.diff
View Options
Index: head/sbin/newfs/mkfs.c
===================================================================
--- head/sbin/newfs/mkfs.c
+++ head/sbin/newfs/mkfs.c
@@ -613,8 +613,7 @@
}
for (i = 0; i < sblock.fs_cssize; i += sblock.fs_bsize)
wtfs(fsbtodb(&sblock, sblock.fs_csaddr + numfrags(&sblock, i)),
- sblock.fs_cssize - i < sblock.fs_bsize ?
- sblock.fs_cssize - i : sblock.fs_bsize,
+ MIN(sblock.fs_cssize - i, sblock.fs_bsize),
((char *)fscs) + i);
/*
* Update information about this partition in pack
@@ -660,8 +659,7 @@
acg.cg_magic = CG_MAGIC;
acg.cg_cgx = cylno;
acg.cg_niblk = sblock.fs_ipg;
- acg.cg_initediblk = sblock.fs_ipg < 2 * INOPB(&sblock) ?
- sblock.fs_ipg : 2 * INOPB(&sblock);
+ acg.cg_initediblk = MIN(sblock.fs_ipg, 2 * INOPB(&sblock));
acg.cg_ndblk = dmax - cbase;
if (sblock.fs_contigsumsize > 0)
acg.cg_nclusterblks = acg.cg_ndblk / sblock.fs_frag;
@@ -771,7 +769,7 @@
* Write out the duplicate super block, the cylinder group map
* and two blocks worth of inodes in a single write.
*/
- start = sblock.fs_bsize > SBLOCKSIZE ? sblock.fs_bsize : SBLOCKSIZE;
+ start = MAX(sblock.fs_bsize, SBLOCKSIZE);
bcopy((char *)&acg, &iobuf[start], sblock.fs_cgsize);
start += sblock.fs_bsize;
dp1 = (struct ufs1_dinode *)(&iobuf[start]);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 14, 6:49 AM (20 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29643901
Default Alt Text
D6118.id15810.diff (1 KB)
Attached To
Mode
D6118: Use MIN()/MAX() macros from sys/param.h.
Attached
Detach File
Event Timeline
Log In to Comment