aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsdb
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-03-17 12:59:55 +0000
committerEd Maste <emaste@FreeBSD.org>2018-03-17 12:59:55 +0000
commitd8ba45e21358ccd9c50991e62cf863bc19699756 (patch)
tree45c6abbd5a9b767ea88e1ebc76e9d804b6a87cd7 /sbin/fsdb
parent7651c3af83d9d83f9b6f18bb55eba52fe1657e55 (diff)
downloadsrc-d8ba45e21358ccd9c50991e62cf863bc19699756.tar.gz
src-d8ba45e21358ccd9c50991e62cf863bc19699756.zip
Revert r313780 (UFS_ prefix)
Notes
Notes: svn path=/head/; revision=331095
Diffstat (limited to 'sbin/fsdb')
-rw-r--r--sbin/fsdb/fsdb.c22
-rw-r--r--sbin/fsdb/fsdbutil.c36
2 files changed, 29 insertions, 29 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index 8f1598c1e8ab..1c6f78302fce 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -512,14 +512,14 @@ CMDFUNCSTART(findblk)
/* Get on-disk inode aka dinode. */
curinum = inum;
curinode = ginode(inum);
- /* Find UFS_IFLNK dinode with allocated data blocks. */
- switch (DIP(curinode, di_mode) & UFS_IFMT) {
- case UFS_IFDIR:
- case UFS_IFREG:
+ /* Find IFLNK dinode with allocated data blocks. */
+ switch (DIP(curinode, di_mode) & IFMT) {
+ case IFDIR:
+ case IFREG:
if (DIP(curinode, di_blocks) == 0)
continue;
break;
- case UFS_IFLNK:
+ case IFLNK:
{
uint64_t size = DIP(curinode, di_size);
if (size > 0 && size < sblock.fs_maxsymlinklen &&
@@ -889,10 +889,10 @@ struct typemap {
const char *typename;
int typebits;
} typenamemap[] = {
- {"file", UFS_IFREG},
- {"dir", UFS_IFDIR},
- {"socket", UFS_IFSOCK},
- {"fifo", UFS_IFIFO},
+ {"file", IFREG},
+ {"dir", IFDIR},
+ {"socket", IFSOCK},
+ {"fifo", IFIFO},
};
CMDFUNCSTART(newtype)
@@ -902,7 +902,7 @@ CMDFUNCSTART(newtype)
if (!checkactive())
return 1;
- type = DIP(curinode, di_mode) & UFS_IFMT;
+ type = DIP(curinode, di_mode) & IFMT;
for (tp = typenamemap;
tp < &typenamemap[nitems(typenamemap)];
tp++) {
@@ -917,7 +917,7 @@ CMDFUNCSTART(newtype)
warnx("try one of `file', `dir', `socket', `fifo'");
return 1;
}
- DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~UFS_IFMT);
+ DIP_SET(curinode, di_mode, DIP(curinode, di_mode) & ~IFMT);
DIP_SET(curinode, di_mode, DIP(curinode, di_mode) | type);
inodirty();
printactive(0);
diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c
index afb0d20fd74f..6ad315df8eb6 100644
--- a/sbin/fsdb/fsdbutil.c
+++ b/sbin/fsdb/fsdbutil.c
@@ -120,20 +120,20 @@ printstat(const char *cp, ino_t inum, union dinode *dp)
time_t t;
printf("%s: ", cp);
- switch (DIP(dp, di_mode) & UFS_IFMT) {
- case UFS_IFDIR:
+ switch (DIP(dp, di_mode) & IFMT) {
+ case IFDIR:
puts("directory");
break;
- case UFS_IFREG:
+ case IFREG:
puts("regular file");
break;
- case UFS_IFBLK:
+ case IFBLK:
printf("block special (%#jx)", (uintmax_t)DIP(dp, di_rdev));
break;
- case UFS_IFCHR:
+ case IFCHR:
printf("character special (%#jx)", DIP(dp, di_rdev));
break;
- case UFS_IFLNK:
+ case IFLNK:
fputs("symlink",stdout);
if (DIP(dp, di_size) > 0 &&
DIP(dp, di_size) < sblock.fs_maxsymlinklen &&
@@ -147,10 +147,10 @@ printstat(const char *cp, ino_t inum, union dinode *dp)
putchar('\n');
}
break;
- case UFS_IFSOCK:
+ case IFSOCK:
puts("socket");
break;
- case UFS_IFIFO:
+ case IFIFO:
puts("fifo");
break;
}
@@ -338,7 +338,7 @@ checkactivedir(void)
warnx("no current inode\n");
return 0;
}
- if ((DIP(curinode, di_mode) & UFS_IFMT) != UFS_IFDIR) {
+ if ((DIP(curinode, di_mode) & IFMT) != IFDIR) {
warnx("inode %ju not a directory", (uintmax_t)curinum);
return 0;
}
@@ -350,14 +350,14 @@ printactive(int doblocks)
{
if (!checkactive())
return 1;
- switch (DIP(curinode, di_mode) & UFS_IFMT) {
- case UFS_IFDIR:
- case UFS_IFREG:
- case UFS_IFBLK:
- case UFS_IFCHR:
- case UFS_IFLNK:
- case UFS_IFSOCK:
- case UFS_IFIFO:
+ switch (DIP(curinode, di_mode) & IFMT) {
+ case IFDIR:
+ case IFREG:
+ case IFBLK:
+ case IFCHR:
+ case IFLNK:
+ case IFSOCK:
+ case IFIFO:
if (doblocks)
printblocks(curinum, curinode);
else
@@ -368,7 +368,7 @@ printactive(int doblocks)
break;
default:
printf("current inode %ju: screwy itype 0%o (mode 0%o)?\n",
- (uintmax_t)curinum, DIP(curinode, di_mode) & UFS_IFMT,
+ (uintmax_t)curinum, DIP(curinode, di_mode) & IFMT,
DIP(curinode, di_mode));
break;
}