aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsck_ffs/dir.c')
-rw-r--r--sbin/fsck_ffs/dir.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c
index 503dc2ed79df..212833cb1f42 100644
--- a/sbin/fsck_ffs/dir.c
+++ b/sbin/fsck_ffs/dir.c
@@ -264,7 +264,7 @@ fileerror(ino_t cwd, ino_t ino, const char *errmesg)
dp = ginode(ino);
if (ftypeok(dp))
pfatal("%s=%s\n",
- (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ? "DIR" : "FILE",
+ (DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE",
pathbuf);
else
pfatal("NAME=%s\n", pathbuf);
@@ -308,8 +308,7 @@ adjust(struct inodesc *idesc, int lcnt)
}
if (lcnt != 0) {
pwarn("LINK COUNT %s", (lfdir == idesc->id_number) ? lfname :
- ((DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR ?
- "DIR" : "FILE"));
+ ((DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE"));
pinode(idesc->id_number);
printf(" COUNT %d SHOULD BE %d",
DIP(dp, di_nlink), DIP(dp, di_nlink) - lcnt);
@@ -389,7 +388,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name)
memset(&idesc, 0, sizeof(struct inodesc));
dp = ginode(orphan);
- lostdir = (DIP(dp, di_mode) & UFS_IFMT) == UFS_IFDIR;
+ lostdir = (DIP(dp, di_mode) & IFMT) == IFDIR;
pwarn("UNREF %s ", lostdir ? "DIR" : "FILE");
pinode(orphan);
if (preen && DIP(dp, di_size) == 0)
@@ -437,7 +436,7 @@ linkup(ino_t orphan, ino_t parentdir, char *name)
}
}
dp = ginode(lfdir);
- if ((DIP(dp, di_mode) & UFS_IFMT) != UFS_IFDIR) {
+ if ((DIP(dp, di_mode) & IFMT) != IFDIR) {
pfatal("lost+found IS NOT A DIRECTORY");
if (reply("REALLOCATE") == 0)
return (0);
@@ -616,7 +615,7 @@ allocdir(ino_t parent, ino_t request, int mode)
struct inoinfo *inp;
struct dirtemplate *dirp;
- ino = allocino(request, UFS_IFDIR|mode);
+ ino = allocino(request, IFDIR|mode);
dirp = &dirhead;
dirp->dot_ino = ino;
dirp->dotdot_ino = parent;