aboutsummaryrefslogtreecommitdiff
path: root/sbin/newfs
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-02-15 19:50:26 +0000
committerEd Maste <emaste@FreeBSD.org>2017-02-15 19:50:26 +0000
commit1dc349ab9564b54c1b1f619045e95f966a9aae86 (patch)
tree9430648d462fa23db629b080e6fa38b22a37260c /sbin/newfs
parent605703b5dfe92b64a2127637f30db6385a89f685 (diff)
Notes
Diffstat (limited to 'sbin/newfs')
-rw-r--r--sbin/newfs/mkfs.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index b736978499357..fb58a57d0aa8b 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -273,7 +273,7 @@ restart:
sblock.fs_sblockloc = SBLOCK_UFS1;
sblock.fs_nindir = sblock.fs_bsize / sizeof(ufs1_daddr_t);
sblock.fs_inopb = sblock.fs_bsize / sizeof(struct ufs1_dinode);
- sblock.fs_maxsymlinklen = ((NDADDR + NIADDR) *
+ sblock.fs_maxsymlinklen = ((UFS_NDADDR + UFS_NIADDR) *
sizeof(ufs1_daddr_t));
sblock.fs_old_inodefmt = FS_44INODEFMT;
sblock.fs_old_cgoffset = 0;
@@ -292,7 +292,7 @@ restart:
sblock.fs_sblockloc = SBLOCK_UFS2;
sblock.fs_nindir = sblock.fs_bsize / sizeof(ufs2_daddr_t);
sblock.fs_inopb = sblock.fs_bsize / sizeof(struct ufs2_dinode);
- sblock.fs_maxsymlinklen = ((NDADDR + NIADDR) *
+ sblock.fs_maxsymlinklen = ((UFS_NDADDR + UFS_NIADDR) *
sizeof(ufs2_daddr_t));
}
sblock.fs_sblkno =
@@ -301,8 +301,8 @@ restart:
sblock.fs_cblkno = sblock.fs_sblkno +
roundup(howmany(SBLOCKSIZE, sblock.fs_fsize), sblock.fs_frag);
sblock.fs_iblkno = sblock.fs_cblkno + sblock.fs_frag;
- sblock.fs_maxfilesize = sblock.fs_bsize * NDADDR - 1;
- for (sizepb = sblock.fs_bsize, i = 0; i < NIADDR; i++) {
+ sblock.fs_maxfilesize = sblock.fs_bsize * UFS_NDADDR - 1;
+ for (sizepb = sblock.fs_bsize, i = 0; i < UFS_NIADDR; i++) {
sizepb *= NINDIR(&sblock);
sblock.fs_maxfilesize += sizepb;
}
@@ -473,7 +473,8 @@ restart:
fragnum(&sblock, sblock.fs_size) +
(fragnum(&sblock, csfrags) > 0 ?
sblock.fs_frag - fragnum(&sblock, csfrags) : 0);
- sblock.fs_cstotal.cs_nifree = sblock.fs_ncg * sblock.fs_ipg - ROOTINO;
+ sblock.fs_cstotal.cs_nifree =
+ sblock.fs_ncg * sblock.fs_ipg - UFS_ROOTINO;
sblock.fs_cstotal.cs_ndir = 0;
sblock.fs_dsize -= csfrags;
sblock.fs_time = utime;
@@ -696,7 +697,7 @@ initcg(int cylno, time_t utime)
}
acg.cg_cs.cs_nifree += sblock.fs_ipg;
if (cylno == 0)
- for (i = 0; i < (long)ROOTINO; i++) {
+ for (i = 0; i < (long)UFS_ROOTINO; i++) {
setbit(cg_inosused(&acg), i);
acg.cg_cs.cs_nifree--;
}
@@ -808,16 +809,16 @@ initcg(int cylno, time_t utime)
#define ROOTLINKCNT 3
static struct direct root_dir[] = {
- { ROOTINO, sizeof(struct direct), DT_DIR, 1, "." },
- { ROOTINO, sizeof(struct direct), DT_DIR, 2, ".." },
- { ROOTINO + 1, sizeof(struct direct), DT_DIR, 5, ".snap" },
+ { UFS_ROOTINO, sizeof(struct direct), DT_DIR, 1, "." },
+ { UFS_ROOTINO, sizeof(struct direct), DT_DIR, 2, ".." },
+ { UFS_ROOTINO + 1, sizeof(struct direct), DT_DIR, 5, ".snap" },
};
#define SNAPLINKCNT 2
static struct direct snap_dir[] = {
- { ROOTINO + 1, sizeof(struct direct), DT_DIR, 1, "." },
- { ROOTINO, sizeof(struct direct), DT_DIR, 2, ".." },
+ { UFS_ROOTINO + 1, sizeof(struct direct), DT_DIR, 1, "." },
+ { UFS_ROOTINO, sizeof(struct direct), DT_DIR, 2, ".." },
};
void
@@ -854,7 +855,7 @@ fsinit(time_t utime)
btodb(fragroundup(&sblock, node.dp1.di_size));
wtfs(fsbtodb(&sblock, node.dp1.di_db[0]), sblock.fs_fsize,
iobuf);
- iput(&node, ROOTINO);
+ iput(&node, UFS_ROOTINO);
if (!nflag) {
/*
* create the .snap directory
@@ -869,7 +870,7 @@ fsinit(time_t utime)
btodb(fragroundup(&sblock, node.dp1.di_size));
wtfs(fsbtodb(&sblock, node.dp1.di_db[0]),
sblock.fs_fsize, iobuf);
- iput(&node, ROOTINO + 1);
+ iput(&node, UFS_ROOTINO + 1);
}
} else {
/*
@@ -890,7 +891,7 @@ fsinit(time_t utime)
btodb(fragroundup(&sblock, node.dp2.di_size));
wtfs(fsbtodb(&sblock, node.dp2.di_db[0]), sblock.fs_fsize,
iobuf);
- iput(&node, ROOTINO);
+ iput(&node, UFS_ROOTINO);
if (!nflag) {
/*
* create the .snap directory
@@ -905,7 +906,7 @@ fsinit(time_t utime)
btodb(fragroundup(&sblock, node.dp2.di_size));
wtfs(fsbtodb(&sblock, node.dp2.di_db[0]),
sblock.fs_fsize, iobuf);
- iput(&node, ROOTINO + 1);
+ iput(&node, UFS_ROOTINO + 1);
}
}
}