summaryrefslogtreecommitdiffstats
path: root/sbin/dump/traverse.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dump/traverse.c')
-rw-r--r--sbin/dump/traverse.c72
1 files changed, 19 insertions, 53 deletions
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index f948dd2..ef57f26 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -50,11 +50,9 @@ static const char rcsid[] =
#include <ctype.h>
#include <stdio.h>
-#ifdef __STDC__
#include <errno.h>
#include <string.h>
#include <unistd.h>
-#endif
#include "dump.h"
@@ -67,11 +65,11 @@ typedef quad_t fsizeT;
typedef long fsizeT;
#endif
-static int dirindir __P((ino_t ino, daddr_t blkno, int level, long *size,
- long *tapesize, int nodump));
-static void dmpindir __P((ino_t ino, daddr_t blk, int level, fsizeT *size));
-static int searchdir __P((ino_t ino, daddr_t blkno, long size, long filesize,
- long *tapesize, int nodump));
+static int dirindir(ino_t ino, 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,
+ long *tapesize, int nodump);
/*
* This is an estimation of the number of TP_BSIZE blocks in the file.
@@ -81,8 +79,7 @@ static int searchdir __P((ino_t ino, daddr_t blkno, long size, long filesize,
* hence the estimate may be high.
*/
long
-blockest(dp)
- struct dinode *dp;
+blockest(struct dinode *dp)
{
long blkest, sizeest;
@@ -134,9 +131,7 @@ blockest(dp)
* the directories in the filesystem.
*/
int
-mapfiles(maxino, tapesize)
- ino_t maxino;
- long *tapesize;
+mapfiles(ino_t maxino, long *tapesize)
{
int mode;
ino_t ino;
@@ -191,9 +186,7 @@ mapfiles(maxino, tapesize)
* pass using this algorithm.
*/
int
-mapdirs(maxino, tapesize)
- ino_t maxino;
- long *tapesize;
+mapdirs(ino_t maxino, long *tapesize)
{
struct dinode *dp;
int i, isdir, nodump;
@@ -263,13 +256,8 @@ mapdirs(maxino, tapesize)
* require the directory to be dumped.
*/
static int
-dirindir(ino, blkno, ind_level, filesize, tapesize, nodump)
- ino_t ino;
- daddr_t blkno;
- int ind_level;
- long *filesize;
- long *tapesize;
- int nodump;
+dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize,
+ long *tapesize, int nodump)
{
int ret = 0;
int i;
@@ -305,13 +293,8 @@ dirindir(ino, blkno, ind_level, filesize, tapesize, nodump)
* contains any subdirectories.
*/
static int
-searchdir(ino, blkno, size, filesize, tapesize, nodump)
- ino_t ino;
- daddr_t blkno;
- long size;
- long filesize;
- long *tapesize;
- int nodump;
+searchdir(ino_t ino, daddr_t blkno, long size, long filesize,
+ long *tapesize, int nodump)
{
struct direct *dp;
struct dinode *ip;
@@ -373,9 +356,7 @@ searchdir(ino, blkno, size, filesize, tapesize, nodump)
* Dump the contents of an inode to tape.
*/
void
-dumpino(dp, ino)
- struct dinode *dp;
- ino_t ino;
+dumpino(struct dinode *dp, ino_t ino)
{
int ind_level, cnt;
fsizeT size;
@@ -450,11 +431,7 @@ dumpino(dp, ino)
* Read indirect blocks, and pass the data blocks to be dumped.
*/
static void
-dmpindir(ino, blk, ind_level, size)
- ino_t ino;
- daddr_t blk;
- int ind_level;
- fsizeT *size;
+dmpindir(ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
{
int i, cnt;
daddr_t idblk[MAXNINDIR];
@@ -484,10 +461,7 @@ dmpindir(ino, blk, ind_level, size)
* Collect up the data into tape record sized buffers and output them.
*/
void
-blksout(blkp, frags, ino)
- daddr_t *blkp;
- int frags;
- ino_t ino;
+blksout(daddr_t *blkp, int frags, ino_t ino)
{
daddr_t *bp;
int i, j, count, blks, tbperdb;
@@ -522,10 +496,7 @@ blksout(blkp, frags, ino)
* Dump a map to the tape.
*/
void
-dumpmap(map, type, ino)
- char *map;
- int type;
- ino_t ino;
+dumpmap(char *map, int type, ino_t ino)
{
int i;
char *cp;
@@ -541,8 +512,7 @@ dumpmap(map, type, ino)
* Write a header record to the dump tape.
*/
void
-writeheader(ino)
- ino_t ino;
+writeheader(ino_t ino)
{
int32_t sum, cnt, *lp;
@@ -563,8 +533,7 @@ writeheader(ino)
}
struct dinode *
-getino(inum)
- ino_t inum;
+getino(ino_t inum)
{
static daddr_t minino, maxino;
static struct dinode inoblock[MAXINOPB];
@@ -589,10 +558,7 @@ int breaderrors = 0;
#define BREADEMAX 32
void
-bread(blkno, buf, size)
- daddr_t blkno;
- char *buf;
- int size;
+bread(daddr_t blkno, char *buf, int size)
{
int cnt, i;
OpenPOWER on IntegriCloud