Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Stuff UFS_ in front of a few of ufs's symbols to reduce name...
details: https://anonhg.NetBSD.org/src/rev/1604c00d5516
branches: trunk
changeset: 784212:1604c00d5516
user: dholland <dholland%NetBSD.org@localhost>
date: Tue Jan 22 09:39:11 2013 +0000
description:
Stuff UFS_ in front of a few of ufs's symbols to reduce namespace
pollution. Specifically:
ROOTINO -> UFS_ROOTINO
WINO -> UFS_WINO
NXADDR -> UFS_NXADDR
NDADDR -> UFS_NDADDR
NIADDR -> UFS_NIADDR
MAXSYMLINKLEN -> UFS_MAXSYMLINKLEN
MAXSYMLINKLEN_UFS[12] -> UFS[12]_MAXSYMLINKLEN (for consistency)
Sort out ext2fs's misuse of NDADDR and NIADDR; fortunately, these have
the same values in ext2fs and ffs.
No functional change intended.
diffstat:
libexec/lfs_cleanerd/coalesce.c | 4 +-
libexec/lfs_cleanerd/lfs_cleanerd.c | 10 +-
sbin/dump/dump.h | 4 +-
sbin/dump/ffs_inode.c | 6 +-
sbin/dump/traverse.c | 24 +++---
sbin/dump_lfs/lfs_inode.c | 22 +++---
sbin/fsck_ext2fs/dir.c | 6 +-
sbin/fsck_ext2fs/inode.c | 14 ++--
sbin/fsck_ext2fs/pass1.c | 22 +++---
sbin/fsck_ext2fs/setup.c | 8 +-
sbin/fsck_ffs/dir.c | 34 +++++-----
sbin/fsck_ffs/inode.c | 54 ++++++++--------
sbin/fsck_ffs/main.c | 6 +-
sbin/fsck_ffs/pass1.c | 32 +++++-----
sbin/fsck_ffs/pass1b.c | 6 +-
sbin/fsck_ffs/pass2.c | 50 ++++++++--------
sbin/fsck_ffs/pass3.c | 8 +-
sbin/fsck_ffs/pass4.c | 6 +-
sbin/fsck_ffs/pass5.c | 10 +-
sbin/fsck_ffs/setup.c | 16 ++--
sbin/fsck_ffs/utilities.c | 12 +-
sbin/fsck_lfs/dir.c | 30 ++++----
sbin/fsck_lfs/inode.c | 22 +++---
sbin/fsck_lfs/lfs.c | 28 ++++----
sbin/fsck_lfs/pass0.c | 4 +-
sbin/fsck_lfs/pass1.c | 18 ++--
sbin/fsck_lfs/pass2.c | 30 ++++----
sbin/fsck_lfs/pass3.c | 4 +-
sbin/fsck_lfs/pass4.c | 4 +-
sbin/fsck_lfs/pass6.c | 18 ++--
sbin/fsck_lfs/segwrite.c | 14 ++--
sbin/fsck_lfs/setup.c | 8 +-
sbin/fsck_lfs/utilities.c | 8 +-
sbin/fsdb/fsdb.c | 32 +++++-----
sbin/newfs/mkfs.c | 36 +++++-----
sbin/newfs_ext2fs/mke2fs.c | 24 +++---
sbin/newfs_lfs/make_lfs.c | 40 ++++++------
sbin/resize_ffs/resize_ffs.c | 20 +++---
sbin/restore/dirs.c | 10 +-
sbin/restore/interactive.c | 16 ++--
sbin/restore/main.c | 12 +-
sbin/restore/restore.c | 22 +++---
sbin/restore/symtab.c | 24 +++---
sbin/restore/tape.c | 6 +-
sbin/restore/utilities.c | 6 +-
sys/arch/hp700/stand/xxboot/readufs.c | 12 +-
sys/arch/mvme68k/stand/installboot/installboot.c | 4 +-
sys/arch/sparc/stand/bootblk/genfth.cf | 8 +-
sys/arch/x68k/stand/boot_ufs/readufs.c | 12 +-
sys/lib/libsa/ext2fs.c | 38 ++++++------
sys/lib/libsa/ufs.c | 26 ++++----
sys/nfs/nfs_vfsops.c | 6 +-
sys/ufs/chfs/chfs_inode.h | 9 +-
sys/ufs/chfs/chfs_vfsops.c | 4 +-
sys/ufs/chfs/chfs_vnops.c | 6 +-
sys/ufs/ext2fs/ext2fs_balloc.c | 16 ++--
sys/ufs/ext2fs/ext2fs_bmap.c | 14 ++--
sys/ufs/ext2fs/ext2fs_bswap.c | 6 +-
sys/ufs/ext2fs/ext2fs_dinode.h | 20 ++++--
sys/ufs/ext2fs/ext2fs_inode.c | 38 +++++++----
sys/ufs/ext2fs/ext2fs_lookup.c | 6 +-
sys/ufs/ext2fs/ext2fs_rename.c | 8 +-
sys/ufs/ext2fs/ext2fs_vnops.c | 6 +-
sys/ufs/ffs/ffs_alloc.c | 8 +-
sys/ufs/ffs/ffs_balloc.c | 26 ++++----
sys/ufs/ffs/ffs_bswap.c | 8 +-
sys/ufs/ffs/ffs_inode.c | 34 +++++-----
sys/ufs/ffs/ffs_snapshot.c | 73 ++++++++++++-----------
sys/ufs/ffs/ffs_vfsops.c | 8 +-
sys/ufs/ffs/ffs_vnops.c | 10 +-
sys/ufs/ffs/ffs_wapbl.c | 8 +-
sys/ufs/ffs/fs.h | 6 +-
sys/ufs/lfs/lfs.h | 16 ++--
sys/ufs/lfs/lfs_alloc.c | 6 +-
sys/ufs/lfs/lfs_balloc.c | 12 +-
sys/ufs/lfs/lfs_debug.c | 8 +-
sys/ufs/lfs/lfs_inode.c | 40 ++++++------
sys/ufs/lfs/lfs_rfw.c | 10 +-
sys/ufs/lfs/lfs_segment.c | 22 +++---
sys/ufs/lfs/lfs_syscalls.c | 6 +-
sys/ufs/lfs/lfs_vfsops.c | 14 ++--
sys/ufs/lfs/lfs_vnops.c | 10 +-
sys/ufs/ufs/dinode.h | 32 +++++-----
sys/ufs/ufs/ufs_bmap.c | 26 ++++----
sys/ufs/ufs/ufs_inode.c | 6 +-
sys/ufs/ufs/ufs_lookup.c | 18 ++--
sys/ufs/ufs/ufs_readwrite.c | 12 +-
sys/ufs/ufs/ufs_rename.c | 8 +-
sys/ufs/ufs/ufs_vfsops.c | 6 +-
sys/ufs/ufs/ufs_vnops.c | 10 +-
usr.sbin/dumplfs/dumplfs.c | 12 +-
usr.sbin/installboot/ext2fs.c | 12 +-
usr.sbin/installboot/ffs.c | 12 +-
usr.sbin/makefs/ffs.c | 20 +++---
usr.sbin/makefs/ffs/ffs_alloc.c | 8 +-
usr.sbin/makefs/ffs/ffs_balloc.c | 24 +++---
usr.sbin/makefs/ffs/mkfs.c | 20 +++---
usr.sbin/makefs/ffs/ufs_bmap.c | 18 ++--
usr.sbin/quot/quot.c | 14 ++--
usr.sbin/quotacheck/quotacheck.c | 8 +-
100 files changed, 818 insertions(+), 802 deletions(-)
diffs (truncated from 6031 to 300 lines):
diff -r 6a053d8342d1 -r 1604c00d5516 libexec/lfs_cleanerd/coalesce.c
--- a/libexec/lfs_cleanerd/coalesce.c Tue Jan 22 09:04:12 2013 +0000
+++ b/libexec/lfs_cleanerd/coalesce.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coalesce.c,v 1.19 2012/01/02 21:35:17 perseant Exp $ */
+/* $NetBSD: coalesce.c,v 1.20 2013/01/22 09:39:11 dholland Exp $ */
/*-
* Copyright (c) 2002, 2005 The NetBSD Foundation, Inc.
@@ -164,7 +164,7 @@
onb = nb = lblkno(fs, dip->di_size);
/* XXX for now, don't do any file small enough to have fragments */
- if (nb < NDADDR) {
+ if (nb < UFS_NDADDR) {
free(dip);
return COALESCE_TOOSMALL;
}
diff -r 6a053d8342d1 -r 1604c00d5516 libexec/lfs_cleanerd/lfs_cleanerd.c
--- a/libexec/lfs_cleanerd/lfs_cleanerd.c Tue Jan 22 09:04:12 2013 +0000
+++ b/libexec/lfs_cleanerd/lfs_cleanerd.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_cleanerd.c,v 1.31 2012/04/16 10:48:27 joerg Exp $ */
+/* $NetBSD: lfs_cleanerd.c,v 1.32 2013/01/22 09:39:11 dholland Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -342,9 +342,9 @@
#ifdef TEST_PATTERN
/*
- * Check ROOTINO for file data. The assumption is that we are running
+ * Check UFS_ROOTINO for file data. The assumption is that we are running
* the "twofiles" test with the rest of the filesystem empty. Files
- * created by "twofiles" match the test pattern, but ROOTINO and the
+ * created by "twofiles" match the test pattern, but UFS_ROOTINO and the
* executable itself (assumed to be inode 3) should not match.
*/
static void
@@ -950,7 +950,7 @@
check_hidden_cost(struct clfs *fs, BLOCK_INFO *bip, int bic, off_t *ifc)
{
int start;
- struct indir in[NIADDR + 1];
+ struct indir in[UFS_NIADDR + 1];
int num;
int i, j, ebic;
BLOCK_INFO *ebip;
@@ -974,7 +974,7 @@
}
if (bip[i].bi_lbn == LFS_UNUSED_LBN)
continue;
- if (bip[i].bi_lbn < NDADDR)
+ if (bip[i].bi_lbn < UFS_NDADDR)
continue;
ufs_getlbns((struct lfs *)fs, NULL, (daddr_t)bip[i].bi_lbn, in, &num);
diff -r 6a053d8342d1 -r 1604c00d5516 sbin/dump/dump.h
--- a/sbin/dump/dump.h Tue Jan 22 09:04:12 2013 +0000
+++ b/sbin/dump/dump.h Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dump.h,v 1.49 2013/01/13 23:45:35 dholland Exp $ */
+/* $NetBSD: dump.h,v 1.50 2013/01/22 09:39:11 dholland Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -72,7 +72,7 @@
#define ufs_blkoff(u,loc) /* calculates (loc % u->ufs_bsize) */ \
((loc) & (u)->ufs_qbmask)
#define ufs_dblksize(u,d,b) \
- ((((b) >= NDADDR || DIP((d), size) >= ((b)+1) << (u)->ufs_bshift \
+ ((((b) >= UFS_NDADDR || DIP((d), size) >= ((b)+1) << (u)->ufs_bshift \
? (u)->ufs_bsize \
: (ufs_fragroundup((u), ufs_blkoff(u, DIP((d), size)))))))
struct ufsi *ufsib;
diff -r 6a053d8342d1 -r 1604c00d5516 sbin/dump/ffs_inode.c
--- a/sbin/dump/ffs_inode.c Tue Jan 22 09:04:12 2013 +0000
+++ b/sbin/dump/ffs_inode.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_inode.c,v 1.19 2013/01/13 22:59:31 dholland Exp $ */
+/* $NetBSD: ffs_inode.c,v 1.20 2013/01/22 09:39:11 dholland Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -36,7 +36,7 @@
#endif /* not lint */
#ifndef lint
-__RCSID("$NetBSD: ffs_inode.c,v 1.19 2013/01/13 22:59:31 dholland Exp $");
+__RCSID("$NetBSD: ffs_inode.c,v 1.20 2013/01/22 09:39:11 dholland Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -206,7 +206,7 @@
continue;
}
for (i = 0; i < inosused; i++, ino++) {
- if (ino < ROOTINO)
+ if (ino < UFS_ROOTINO)
continue;
mapfileino(ino, tape_size, anydirskipped);
}
diff -r 6a053d8342d1 -r 1604c00d5516 sbin/dump/traverse.c
--- a/sbin/dump/traverse.c Tue Jan 22 09:04:12 2013 +0000
+++ b/sbin/dump/traverse.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: traverse.c,v 1.48 2008/08/12 13:28:35 simonb Exp $ */
+/* $NetBSD: traverse.c,v 1.49 2013/01/22 09:39:11 dholland Exp $ */
/*-
* Copyright (c) 1980, 1988, 1991, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95";
#else
-__RCSID("$NetBSD: traverse.c,v 1.48 2008/08/12 13:28:35 simonb Exp $");
+__RCSID("$NetBSD: traverse.c,v 1.49 2013/01/22 09:39:11 dholland Exp $");
#endif
#endif /* not lint */
@@ -98,10 +98,10 @@
sizeest = howmany(ufs_fragroundup(ufsib, DIP(dp, size)), TP_BSIZE);
if (blkest > sizeest)
blkest = sizeest;
- if (DIP(dp, size) > ufsib->ufs_bsize * NDADDR) {
+ if (DIP(dp, size) > ufsib->ufs_bsize * UFS_NDADDR) {
/* calculate the number of indirect blocks on the dump tape */
blkest +=
- howmany(sizeest - NDADDR * ufsib->ufs_bsize / TP_BSIZE,
+ howmany(sizeest - UFS_NDADDR * ufsib->ufs_bsize / TP_BSIZE,
TP_NINDIR);
}
return (blkest + 1);
@@ -246,7 +246,7 @@
* Ensure that the root inode actually appears in the
* file list for a subdir
*/
- mapfileino(ROOTINO, tape_size, &anydirskipped);
+ mapfileino(UFS_ROOTINO, tape_size, &anydirskipped);
} else {
fs_mapinodes(maxino, tape_size, &anydirskipped);
}
@@ -254,7 +254,7 @@
* Restore gets very upset if the root is not dumped,
* so ensure that it always is dumped.
*/
- SETINO(ROOTINO, dumpinomap);
+ SETINO(UFS_ROOTINO, dumpinomap);
return (anydirskipped);
}
@@ -308,7 +308,7 @@
else
di.dp1 = dp->dp1;
filesize = DIP(&di, size);
- for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) {
+ for (ret = 0, i = 0; filesize > 0 && i < UFS_NDADDR; i++) {
if (is_ufs2)
blk = iswap64(di.dp2.di_db[i]);
else
@@ -322,7 +322,7 @@
else
filesize -= ufsib->ufs_bsize;
}
- for (i = 0; filesize > 0 && i < NIADDR; i++) {
+ for (i = 0; filesize > 0 && i < UFS_NIADDR; i++) {
if (is_ufs2)
blk = iswap64(di.dp2.di_ib[i]);
else
@@ -570,8 +570,8 @@
msg("Warning: undefined file type 0%o\n", DIP(dp, mode) & IFMT);
return;
}
- if (DIP(dp, size) > NDADDR * ufsib->ufs_bsize)
- cnt = NDADDR * ufsib->ufs_frag;
+ if (DIP(dp, size) > UFS_NDADDR * ufsib->ufs_bsize)
+ cnt = UFS_NDADDR * ufsib->ufs_frag;
else
cnt = howmany(DIP(dp, size), ufsib->ufs_fsize);
if (is_ufs2)
@@ -579,9 +579,9 @@
else
blksout32(&dp->dp1.di_db[0], cnt, ino);
- if ((size = DIP(dp, size) - NDADDR * ufsib->ufs_bsize) <= 0)
+ if ((size = DIP(dp, size) - UFS_NDADDR * ufsib->ufs_bsize) <= 0)
return;
- for (ind_level = 0; ind_level < NIADDR; ind_level++) {
+ for (ind_level = 0; ind_level < UFS_NIADDR; ind_level++) {
if (is_ufs2)
blk = iswap64(dp->dp2.di_ib[ind_level]);
else
diff -r 6a053d8342d1 -r 1604c00d5516 sbin/dump_lfs/lfs_inode.c
--- a/sbin/dump_lfs/lfs_inode.c Tue Jan 22 09:04:12 2013 +0000
+++ b/sbin/dump_lfs/lfs_inode.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_inode.c,v 1.15 2011/08/14 12:13:24 christos Exp $ */
+/* $NetBSD: lfs_inode.c,v 1.16 2013/01/22 09:39:11 dholland Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95";
#else
-__RCSID("$NetBSD: lfs_inode.c,v 1.15 2011/08/14 12:13:24 christos Exp $");
+__RCSID("$NetBSD: lfs_inode.c,v 1.16 2013/01/22 09:39:11 dholland Exp $");
#endif
#endif /* not lint */
@@ -187,16 +187,16 @@
{
ino_t ino;
- for (ino = ROOTINO; ino < maxino; ino++)
+ for (ino = UFS_ROOTINO; ino < maxino; ino++)
mapfileino(ino, tapesz, anydirskipped);
}
/*
* XXX KS - I know there's a better way to do this.
*/
-#define BASE_SINDIR (NDADDR)
-#define BASE_DINDIR (NDADDR+NINDIR(fs))
-#define BASE_TINDIR (NDADDR+NINDIR(fs)+NINDIR(fs)*NINDIR(fs))
+#define BASE_SINDIR (UFS_NDADDR)
+#define BASE_DINDIR (UFS_NDADDR+NINDIR(fs))
+#define BASE_TINDIR (UFS_NDADDR+NINDIR(fs)+NINDIR(fs)*NINDIR(fs))
#define D_UNITS (NINDIR(fs))
#define T_UNITS (NINDIR(fs)*NINDIR(fs))
@@ -221,7 +221,7 @@
*/
if(lbn < 0) {
lbn *= -1;
- if(lbn == NDADDR) {
+ if (lbn == UFS_NDADDR) {
/* printf("lbn %d: single indir base\n", -lbn); */
return idinode->di_ib[0]; /* single indirect */
} else if(lbn == BASE_DINDIR+1) {
@@ -236,7 +236,7 @@
* Find the immediate parent. This is essentially finding the
* residue of modulus, and then rounding accordingly.
*/
- residue = (lbn-NDADDR) % NINDIR(fs);
+ residue = (lbn-UFS_NDADDR) % NINDIR(fs);
if(residue == 1) {
/* Double indirect. Parent is the triple. */
up = idinode->di_ib[2];
@@ -265,12 +265,12 @@
}
} else {
/* Direct block. Its parent must be a single indirect. */
- if(lbn < NDADDR)
+ if (lbn < UFS_NDADDR)
return idinode->di_db[lbn];
else {
/* Parent is an indirect block. */
- up = -(((lbn-NDADDR) / D_UNITS) * D_UNITS + NDADDR);
- off = (lbn-NDADDR) % D_UNITS;
+ up = -(((lbn-UFS_NDADDR) / D_UNITS) * D_UNITS + UFS_NDADDR);
+ off = (lbn-UFS_NDADDR) % D_UNITS;
/* printf("lbn %d: parent is %d/%d\n", lbn,up,off); */
}
}
diff -r 6a053d8342d1 -r 1604c00d5516 sbin/fsck_ext2fs/dir.c
--- a/sbin/fsck_ext2fs/dir.c Tue Jan 22 09:04:12 2013 +0000
+++ b/sbin/fsck_ext2fs/dir.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.25 2012/11/25 19:42:14 jakllsch Exp $ */
+/* $NetBSD: dir.c,v 1.26 2013/01/22 09:39:11 dholland Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@@ -58,7 +58,7 @@
#if 0
static char sccsid[] = "@(#)dir.c 8.5 (Berkeley) 12/8/94";
#else
-__RCSID("$NetBSD: dir.c,v 1.25 2012/11/25 19:42:14 jakllsch Exp $");
+__RCSID("$NetBSD: dir.c,v 1.26 2013/01/22 09:39:11 dholland Exp $");
#endif
#endif /* not lint */
@@ -559,7 +559,7 @@
char *firstblk;
lastbn = lblkno(&sblock, inosize(dp));
- if (lastbn >= NDADDR - 1 || fs2h32(dp->e2di_blocks[lastbn]) == 0 ||
+ if (lastbn >= EXT2FS_NDADDR - 1 || fs2h32(dp->e2di_blocks[lastbn]) == 0 ||
inosize(dp) == 0) {
return (0);
}
diff -r 6a053d8342d1 -r 1604c00d5516 sbin/fsck_ext2fs/inode.c
--- a/sbin/fsck_ext2fs/inode.c Tue Jan 22 09:04:12 2013 +0000
+++ b/sbin/fsck_ext2fs/inode.c Tue Jan 22 09:39:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inode.c,v 1.32 2012/11/25 19:42:14 jakllsch Exp $ */
+/* $NetBSD: inode.c,v 1.33 2013/01/22 09:39:11 dholland Exp $ */
/*
Home |
Main Index |
Thread Index |
Old Index