aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsdb/fsdb.c
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/fsdb/fsdb.c
parent605703b5dfe92b64a2127637f30db6385a89f685 (diff)
downloadsrc-1dc349ab9564b54c1b1f619045e95f966a9aae86.tar.gz
src-1dc349ab9564b54c1b1f619045e95f966a9aae86.zip
prefix UFS symbols with UFS_ to reduce namespace pollution
Specifically: ROOTINO -> UFS_ROOTINO WINO -> UFS_WINO NXADDR -> UFS_NXADDR NDADDR -> UFS_NDADDR NIADDR -> UFS_NIADDR MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency) Also prefix ext2's and nandfs's NDADDR and NIADDR with EXT2_ and NANDFS_ Reviewed by: kib, mckusick Obtained from: NetBSD MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9536
Notes
Notes: svn path=/head/; revision=313780
Diffstat (limited to 'sbin/fsdb/fsdb.c')
-rw-r--r--sbin/fsdb/fsdb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index b35a06775452..4a612ec7cd2e 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -231,8 +231,8 @@ cmdloop(void)
EditLine *elptr;
HistEvent he;
- curinode = ginode(ROOTINO);
- curinum = ROOTINO;
+ curinode = ginode(UFS_ROOTINO);
+ curinum = UFS_ROOTINO;
printactive(0);
hist = history_init();
@@ -299,11 +299,11 @@ union dinode *curinode;
ino_t curinum, ocurrent;
#define GETINUM(ac,inum) inum = strtoul(argv[ac], &cp, 0); \
- if (inum < ROOTINO || inum > maxino || cp == argv[ac] || *cp != '\0' ) { \
+if (inum < UFS_ROOTINO || inum > maxino || cp == argv[ac] || *cp != '\0' ) { \
printf("inode %ju out of range; range is [%ju,%ju]\n", \
- (uintmax_t)inum, (uintmax_t)ROOTINO, (uintmax_t)maxino); \
+ (uintmax_t)inum, (uintmax_t)UFS_ROOTINO, (uintmax_t)maxino);\
return 1; \
- }
+}
/*
* Focus on given inode number
@@ -486,8 +486,8 @@ CMDFUNCSTART(findblk)
inosused = sblock.fs_ipg;
for (; inosused > 0; inum++, inosused--) {
- /* Skip magic inodes: 0, WINO, ROOTINO. */
- if (inum < ROOTINO)
+ /* Skip magic inodes: 0, UFS_WINO, UFS_ROOTINO. */
+ if (inum < UFS_ROOTINO)
continue;
/*
* Check if the block we are looking for is just an inode block.
@@ -531,10 +531,10 @@ CMDFUNCSTART(findblk)
}
/* Look through direct data blocks. */
if (is_ufs2 ?
- find_blks64(curinode->dp2.di_db, NDADDR, wantedblk64) :
- find_blks32(curinode->dp1.di_db, NDADDR, wantedblk32))
+ find_blks64(curinode->dp2.di_db, UFS_NDADDR, wantedblk64) :
+ find_blks32(curinode->dp1.di_db, UFS_NDADDR, wantedblk32))
goto end;
- for (i = 0; i < NIADDR; i++) {
+ for (i = 0; i < UFS_NIADDR; i++) {
/*
* Does the block we are looking for belongs to the
* indirect blocks?
@@ -726,8 +726,8 @@ CMDFUNCSTART(focusname)
ocurrent = curinum;
if (argv[1][0] == '/') {
- curinum = ROOTINO;
- curinode = ginode(ROOTINO);
+ curinum = UFS_ROOTINO;
+ curinode = ginode(UFS_ROOTINO);
} else {
if (!checkactivedir())
return 1;