aboutsummaryrefslogtreecommitdiff
path: root/sbin/dump
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2018-03-17 01:48:27 +0000
committerEd Maste <emaste@FreeBSD.org>2018-03-17 01:48:27 +0000
commit1e2b9afca9212aa3d6f9cfc02c54f739a7c7c035 (patch)
tree2a7d490a37367cf95935a2bb7b8dd3cc1a778737 /sbin/dump
parent4e78ff7068e13cb32b4165fe362f8ddf81160031 (diff)
downloadsrc-1e2b9afca9212aa3d6f9cfc02c54f739a7c7c035.tar.gz
src-1e2b9afca9212aa3d6f9cfc02c54f739a7c7c035.zip
Prefix UFS symbols with UFS_ to reduce namespace pollution
Followup to r313780. Also prefix ext2's and nandfs's versions with EXT2_ and NANDFS_. Reported by: kib Reviewed by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D9623
Notes
Notes: svn path=/head/; revision=331083
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/main.c4
-rw-r--r--sbin/dump/traverse.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/sbin/dump/main.c b/sbin/dump/main.c
index 127b5ca33f97..1f30a7a61609 100644
--- a/sbin/dump/main.c
+++ b/sbin/dump/main.c
@@ -550,7 +550,7 @@ main(int argc, char *argv[])
* Skip directory inodes deleted and maybe reallocated
*/
dp = getinode(ino, &mode);
- if (mode != IFDIR)
+ if (mode != UFS_IFDIR)
continue;
(void)dumpino(dp, ino);
}
@@ -569,7 +569,7 @@ main(int argc, char *argv[])
* Skip inodes deleted and reallocated as directories.
*/
dp = getinode(ino, &mode);
- if (mode == IFDIR)
+ if (mode == UFS_IFDIR)
continue;
(void)dumpino(dp, ino);
}
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index 5538133e3813..feb3dd4f644f 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -195,7 +195,7 @@ mapfiles(ino_t maxino, long *tapesize)
for (i = 0; i < inosused; i++, ino++) {
if (ino < UFS_ROOTINO ||
(dp = getinode(ino, &mode)) == NULL ||
- (mode & IFMT) == 0)
+ (mode & UFS_IFMT) == 0)
continue;
if (ino >= maxino) {
msg("Skipping inode %ju >= maxino %ju\n",
@@ -209,19 +209,19 @@ mapfiles(ino_t maxino, long *tapesize)
* (this is used in mapdirs()).
*/
SETINO(ino, usedinomap);
- if (mode == IFDIR)
+ if (mode == UFS_IFDIR)
SETINO(ino, dumpdirmap);
if (WANTTODUMP(dp)) {
SETINO(ino, dumpinomap);
- if (mode != IFREG &&
- mode != IFDIR &&
- mode != IFLNK)
+ if (mode != UFS_IFREG &&
+ mode != UFS_IFDIR &&
+ mode != UFS_IFLNK)
*tapesize += 1;
else
*tapesize += blockest(dp);
continue;
}
- if (mode == IFDIR) {
+ if (mode == UFS_IFDIR) {
if (!nonodump &&
(DIP(dp, di_flags) & UF_NODUMP))
CLRINO(ino, usedinomap);
@@ -429,7 +429,7 @@ searchdir(
* Add back to dumpdirmap and remove from usedinomap
* to propagate nodump.
*/
- if (mode == IFDIR) {
+ if (mode == UFS_IFDIR) {
SETINO(dp->d_ino, dumpdirmap);
CLRINO(dp->d_ino, usedinomap);
ret |= HASSUBDIRS;
@@ -554,7 +554,7 @@ dumpino(union dinode *dp, ino_t ino)
default:
msg("Warning: undefined file type 0%o\n",
- DIP(dp, di_mode) & IFMT);
+ DIP(dp, di_mode) & UFS_IFMT);
return;
}
if (DIP(dp, di_size) > UFS_NDADDR * sblock->fs_bsize) {
@@ -890,11 +890,11 @@ getinode(ino_t inum, int *modep)
gotit:
if (sblock->fs_magic == FS_UFS1_MAGIC) {
dp1 = &((struct ufs1_dinode *)inoblock)[inum - minino];
- *modep = (dp1->di_mode & IFMT);
+ *modep = (dp1->di_mode & UFS_IFMT);
return ((union dinode *)dp1);
}
dp2 = &((struct ufs2_dinode *)inoblock)[inum - minino];
- *modep = (dp2->di_mode & IFMT);
+ *modep = (dp2->di_mode & UFS_IFMT);
return ((union dinode *)dp2);
}