aboutsummaryrefslogtreecommitdiff
path: root/sbin/dump
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2017-12-27 22:18:56 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2017-12-27 22:18:56 +0000
commita770ae06ed16cb28743c54b8317761abd76facec (patch)
treee726eba747ba13302f159d4553b7b90484bcf33b /sbin/dump
parente3e70e1e67b0cfeca9278e543a9153a71b2f02eb (diff)
downloadsrc-a770ae06ed16cb28743c54b8317761abd76facec.tar.gz
src-a770ae06ed16cb28743c54b8317761abd76facec.zip
In preparation for converting to libufs to read the superblock,
change conflicting function names: getino => getinode bread => blkread No functional change.
Notes
Notes: svn path=/head/; revision=327253
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/dump.h4
-rw-r--r--sbin/dump/main.c8
-rw-r--r--sbin/dump/tape.c2
-rw-r--r--sbin/dump/traverse.c20
4 files changed, 17 insertions, 17 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h
index f935fab26b88..7aeb3a90d73f 100644
--- a/sbin/dump/dump.h
+++ b/sbin/dump/dump.h
@@ -108,7 +108,7 @@ int mapfiles(ino_t maxino, long *tapesize);
int mapdirs(ino_t maxino, long *tapesize);
/* file dumping routines */
-void bread(ufs2_daddr_t blkno, char *buf, int size);
+void blkread(ufs2_daddr_t blkno, char *buf, int size);
ssize_t cread(int fd, void *buf, size_t nbytes, off_t offset);
void dumpino(union dinode *dp, ino_t ino);
void dumpmap(char *map, int type, ino_t ino);
@@ -127,7 +127,7 @@ void dumpabort(int signo) __dead2;
void dump_getfstab(void);
char *rawname(char *cp);
-union dinode *getino(ino_t inum, int *mode);
+union dinode *getinode(ino_t inum, int *mode);
/* rdump routines */
#ifdef RDUMP
diff --git a/sbin/dump/main.c b/sbin/dump/main.c
index 91179dd54487..167812bce7d5 100644
--- a/sbin/dump/main.c
+++ b/sbin/dump/main.c
@@ -439,8 +439,8 @@ main(int argc, char *argv[])
sync();
sblock = (struct fs *)sblock_buf;
for (i = 0; sblock_try[i] != -1; i++) {
- sblock->fs_fsize = SBLOCKSIZE; /* needed in bread */
- bread(sblock_try[i] >> dev_bshift, (char *) sblock, SBLOCKSIZE);
+ sblock->fs_fsize = SBLOCKSIZE; /* needed in blkread */
+ blkread(sblock_try[i]>>dev_bshift, (char *) sblock, SBLOCKSIZE);
if ((sblock->fs_magic == FS_UFS1_MAGIC ||
(sblock->fs_magic == FS_UFS2_MAGIC &&
sblock->fs_sblockloc == sblock_try[i])) &&
@@ -556,7 +556,7 @@ main(int argc, char *argv[])
/*
* Skip directory inodes deleted and maybe reallocated
*/
- dp = getino(ino, &mode);
+ dp = getinode(ino, &mode);
if (mode != IFDIR)
continue;
(void)dumpino(dp, ino);
@@ -575,7 +575,7 @@ main(int argc, char *argv[])
/*
* Skip inodes deleted and reallocated as directories.
*/
- dp = getino(ino, &mode);
+ dp = getinode(ino, &mode);
if (mode == IFDIR)
continue;
(void)dumpino(dp, ino);
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c
index 2bddb40bffc7..845a2660dad4 100644
--- a/sbin/dump/tape.c
+++ b/sbin/dump/tape.c
@@ -786,7 +786,7 @@ doslave(int cmd, int slave_number)
for (trecno = 0; trecno < ntrec;
trecno += p->count, p += p->count) {
if (p->dblk) {
- bread(p->dblk, slp->tblock[trecno],
+ blkread(p->dblk, slp->tblock[trecno],
p->count * TP_BSIZE);
} else {
if (p->count != 1 || atomic(read, cmd,
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index c501f985521a..5538133e3813 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -162,7 +162,7 @@ mapfiles(ino_t maxino, long *tapesize)
quit("mapfiles: cannot allocate memory.\n");
for (cg = 0; cg < sblock->fs_ncg; cg++) {
ino = cg * sblock->fs_ipg;
- bread(fsbtodb(sblock, cgtod(sblock, cg)), (char *)cgp,
+ blkread(fsbtodb(sblock, cgtod(sblock, cg)), (char *)cgp,
sblock->fs_cgsize);
if (sblock->fs_magic == FS_UFS2_MAGIC)
inosused = cgp->cg_initediblk;
@@ -194,7 +194,7 @@ mapfiles(ino_t maxino, long *tapesize)
}
for (i = 0; i < inosused; i++, ino++) {
if (ino < UFS_ROOTINO ||
- (dp = getino(ino, &mode)) == NULL ||
+ (dp = getinode(ino, &mode)) == NULL ||
(mode & IFMT) == 0)
continue;
if (ino >= maxino) {
@@ -276,7 +276,7 @@ mapdirs(ino_t maxino, long *tapesize)
nodump = !nonodump && (TSTINO(ino, usedinomap) == 0);
if ((isdir & 1) == 0 || (TSTINO(ino, dumpinomap) && !nodump))
continue;
- dp = getino(ino, &i);
+ dp = getinode(ino, &i);
/*
* inode buf may change in searchdir().
*/
@@ -342,7 +342,7 @@ dirindir(
int ret = 0;
int i;
- bread(fsbtodb(sblock, blkno), (char *)&idblk, (int)sblock->fs_bsize);
+ blkread(fsbtodb(sblock, blkno), (char *)&idblk, (int)sblock->fs_bsize);
if (ind_level <= 0) {
for (i = 0; *filesize > 0 && i < NINDIR(sblock); i++) {
if (sblock->fs_magic == FS_UFS1_MAGIC)
@@ -395,7 +395,7 @@ searchdir(
if (dblk == NULL && (dblk = malloc(sblock->fs_bsize)) == NULL)
quit("searchdir: cannot allocate indirect memory.\n");
- bread(fsbtodb(sblock, blkno), dblk, (int)size);
+ blkread(fsbtodb(sblock, blkno), dblk, (int)size);
if (filesize < size)
size = filesize;
for (loc = 0; loc < size; ) {
@@ -420,7 +420,7 @@ searchdir(
continue;
}
if (nodump) {
- ip = getino(dp->d_ino, &mode);
+ ip = getinode(dp->d_ino, &mode);
if (TSTINO(dp->d_ino, dumpinomap)) {
CLRINO(dp->d_ino, dumpinomap);
*tapesize -= blockest(ip);
@@ -591,7 +591,7 @@ dmpindir(union dinode *dp, ino_t ino, ufs2_daddr_t blk, int ind_level,
int i, cnt, last;
if (blk != 0)
- bread(fsbtodb(sblock, blk), (char *)&idblk,
+ blkread(fsbtodb(sblock, blk), (char *)&idblk,
(int)sblock->fs_bsize);
else
memset(&idblk, 0, sblock->fs_bsize);
@@ -871,7 +871,7 @@ writeheader(ino_t ino)
}
union dinode *
-getino(ino_t inum, int *modep)
+getinode(ino_t inum, int *modep)
{
static ino_t minino, maxino;
static caddr_t inoblock;
@@ -883,7 +883,7 @@ getino(ino_t inum, int *modep)
curino = inum;
if (inum >= minino && inum < maxino)
goto gotit;
- bread(fsbtodb(sblock, ino_to_fsba(sblock, inum)), inoblock,
+ blkread(fsbtodb(sblock, ino_to_fsba(sblock, inum)), inoblock,
(int)sblock->fs_bsize);
minino = inum - (inum % INOPB(sblock));
maxino = minino + INOPB(sblock);
@@ -908,7 +908,7 @@ int breaderrors = 0;
#define BREADEMAX 32
void
-bread(ufs2_daddr_t blkno, char *buf, int size)
+blkread(ufs2_daddr_t blkno, char *buf, int size)
{
int secsize, bytes, resid, xfer, base, cnt, i;
static char *tmpbuf;