summaryrefslogtreecommitdiffstats
path: root/sbin/dump
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-06-06 19:59:46 +0000
committerphk <phk@FreeBSD.org>2002-06-06 19:59:46 +0000
commitefb6005b12a1c3b836b9ce96c58a3388d3f38388 (patch)
tree34efb9362db73fc46fbb82032bc97380cfcbb335 /sbin/dump
parenta251620880c02800edc48f4222136e4258a13e95 (diff)
downloadFreeBSD-src-efb6005b12a1c3b836b9ce96c58a3388d3f38388.zip
FreeBSD-src-efb6005b12a1c3b836b9ce96c58a3388d3f38388.tar.gz
s/daddr_t/ufs_daddr_t/g
This should fix the issues which cropped up after daddr_t grew up. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/dump.h8
-rw-r--r--sbin/dump/tape.c6
-rw-r--r--sbin/dump/traverse.c24
3 files changed, 19 insertions, 19 deletions
diff --git a/sbin/dump/dump.h b/sbin/dump/dump.h
index f32113c..4b42755 100644
--- a/sbin/dump/dump.h
+++ b/sbin/dump/dump.h
@@ -36,7 +36,7 @@
*/
#define MAXINOPB (MAXBSIZE / sizeof(struct dinode))
-#define MAXNINDIR (MAXBSIZE / sizeof(daddr_t))
+#define MAXNINDIR (MAXBSIZE / sizeof(ufs_daddr_t))
/*
* Dump maps used to describe what is to be dumped.
@@ -108,8 +108,8 @@ int mapfiles(ino_t maxino, long *tapesize);
int mapdirs(ino_t maxino, long *tapesize);
/* file dumping routines */
-void blksout(daddr_t *blkp, int frags, ino_t ino);
-void bread(daddr_t blkno, char *buf, int size);
+void blksout(ufs_daddr_t *blkp, int frags, ino_t ino);
+void bread(ufs_daddr_t blkno, char *buf, int size);
void dumpino(struct dinode *dp, ino_t ino);
void dumpmap(char *map, int type, ino_t ino);
void writeheader(ino_t ino);
@@ -117,7 +117,7 @@ void writeheader(ino_t ino);
/* tape writing routines */
int alloctape(void);
void close_rewind(void);
-void dumpblock(daddr_t blkno, int size);
+void dumpblock(ufs_daddr_t blkno, int size);
void startnewtape(int top);
void trewind(void);
void writerec(char *dp, int isspcl);
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c
index 5145717..215d73b2 100644
--- a/sbin/dump/tape.c
+++ b/sbin/dump/tape.c
@@ -87,7 +87,7 @@ static void rollforward(void);
* The following structure defines the instruction packets sent to slaves.
*/
struct req {
- daddr_t dblk;
+ ufs_daddr_t dblk;
int count;
};
int reqsiz;
@@ -161,7 +161,7 @@ void
writerec(char *dp, int isspcl)
{
- slp->req[trecno].dblk = (daddr_t)0;
+ slp->req[trecno].dblk = (ufs_daddr_t)0;
slp->req[trecno].count = 1;
/* Can't do a structure assignment due to alignment problems */
bcopy(dp, *(nextblock)++, sizeof (union u_spcl));
@@ -174,7 +174,7 @@ writerec(char *dp, int isspcl)
}
void
-dumpblock(daddr_t blkno, int size)
+dumpblock(ufs_daddr_t blkno, int size)
{
int avail, tpblks, dblkno;
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index ef57f26..622e32e 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -65,10 +65,10 @@ typedef quad_t fsizeT;
typedef long fsizeT;
#endif
-static int dirindir(ino_t ino, daddr_t blkno, int level, long *size,
+static int dirindir(ino_t ino, ufs_daddr_t blkno, int level, long *size,
long *tapesize, int nodump);
-static void dmpindir(ino_t ino, daddr_t blk, int level, fsizeT *size);
-static int searchdir(ino_t ino, daddr_t blkno, long size, long filesize,
+static void dmpindir(ino_t ino, ufs_daddr_t blk, int level, fsizeT *size);
+static int searchdir(ino_t ino, ufs_daddr_t blkno, long size, long filesize,
long *tapesize, int nodump);
/*
@@ -256,12 +256,12 @@ mapdirs(ino_t maxino, long *tapesize)
* require the directory to be dumped.
*/
static int
-dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize,
+dirindir(ino_t ino, ufs_daddr_t blkno, int ind_level, long *filesize,
long *tapesize, int nodump)
{
int ret = 0;
int i;
- daddr_t idblk[MAXNINDIR];
+ ufs_daddr_t idblk[MAXNINDIR];
bread(fsbtodb(sblock, blkno), (char *)idblk, (int)sblock->fs_bsize);
if (ind_level <= 0) {
@@ -293,7 +293,7 @@ dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize,
* contains any subdirectories.
*/
static int
-searchdir(ino_t ino, daddr_t blkno, long size, long filesize,
+searchdir(ino_t ino, ufs_daddr_t blkno, long size, long filesize,
long *tapesize, int nodump)
{
struct direct *dp;
@@ -431,10 +431,10 @@ dumpino(struct dinode *dp, ino_t ino)
* Read indirect blocks, and pass the data blocks to be dumped.
*/
static void
-dmpindir(ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
+dmpindir(ino_t ino, ufs_daddr_t blk, int ind_level, fsizeT *size)
{
int i, cnt;
- daddr_t idblk[MAXNINDIR];
+ ufs_daddr_t idblk[MAXNINDIR];
if (blk != 0)
bread(fsbtodb(sblock, blk), (char *)idblk, (int) sblock->fs_bsize);
@@ -461,9 +461,9 @@ dmpindir(ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
* Collect up the data into tape record sized buffers and output them.
*/
void
-blksout(daddr_t *blkp, int frags, ino_t ino)
+blksout(ufs_daddr_t *blkp, int frags, ino_t ino)
{
- daddr_t *bp;
+ ufs_daddr_t *bp;
int i, j, count, blks, tbperdb;
blks = howmany(frags * sblock->fs_fsize, TP_BSIZE);
@@ -535,7 +535,7 @@ writeheader(ino_t ino)
struct dinode *
getino(ino_t inum)
{
- static daddr_t minino, maxino;
+ static ufs_daddr_t minino, maxino;
static struct dinode inoblock[MAXINOPB];
curino = inum;
@@ -558,7 +558,7 @@ int breaderrors = 0;
#define BREADEMAX 32
void
-bread(daddr_t blkno, char *buf, int size)
+bread(ufs_daddr_t blkno, char *buf, int size)
{
int cnt, i;
OpenPOWER on IntegriCloud