* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
*
- * $Id: bsdcompat.h,v 1.14 2001/03/20 09:14:58 stelian Exp $
+ * $Id: bsdcompat.h,v 1.15 2001/03/20 10:02:48 stelian Exp $
*/
#include <config.h>
#define MIN(a,b) ((a < b) ? a : b)
#endif
-#define WINO ((ino_t)1)
+#define WINO 1
#define DEV_BSIZE 512
#define DEV_BSHIFT 9
#define MAXBSIZE EXT2_MAX_BLOCK_SIZE
* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
*
- * $Id: dumprestore.h,v 1.11 2001/03/18 15:35:44 stelian Exp $
+ * $Id: dumprestore.h,v 1.12 2001/03/20 10:02:48 stelian Exp $
*/
/*
#define NFS_MAGIC (int)60012
#define CHECKSUM (int)84446
+typedef u_int32_t dump_ino_t;
+
union u_spcl {
char dummy[TP_BSIZE];
struct s_spcl {
int32_t c_ddate; /* date of previous dump */
int32_t c_volume; /* dump volume number */
daddr_t c_tapea; /* logical block of this record */
- ino_t c_inumber; /* number of inode */
+ dump_ino_t c_inumber; /* number of inode */
int32_t c_magic; /* magic number (see above) */
int32_t c_checksum; /* record checksum */
#ifdef __linux__
* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
*
- * $Id: dump.h,v 1.21 2001/03/19 13:22:48 stelian Exp $
+ * $Id: dump.h,v 1.22 2001/03/20 10:02:48 stelian Exp $
*/
/*-
*/
#include <config.h>
+#include <protocols/dumprestore.h>
#define MAXINOPB (MAXBSIZE / sizeof(struct dinode))
#define MAXNINDIR (MAXBSIZE / sizeof(daddr_t))
int diskfd; /* disk file descriptor */
int tapefd; /* tape file descriptor */
int pipeout; /* true => output to standard output */
-ino_t curino; /* current inumber; used globally */
+dump_ino_t curino; /* current inumber; used globally */
int newtape; /* new tape flag */
int density; /* density in 0.1" units */
long tapesize; /* estimated tape size, blocks */
/* mapping rouintes */
struct dinode;
long blockest __P((struct dinode const *dp));
-int mapfiles __P((ino_t maxino, long *tapesize));
+int mapfiles __P((dump_ino_t maxino, long *tapesize));
#ifdef __linux__
-int mapfilesfromdir __P((ino_t maxino, long *tapesize, char *directory));
+int mapfilesfromdir __P((dump_ino_t maxino, long *tapesize, char *directory));
#endif
-int mapdirs __P((ino_t maxino, long *tapesize));
+int mapdirs __P((dump_ino_t maxino, long *tapesize));
/* file dumping routines */
-void blksout __P((daddr_t *blkp, int frags, ino_t ino));
+void blksout __P((daddr_t *blkp, int frags, dump_ino_t ino));
void bread __P((daddr_t blkno, char *buf, int size));
-void dumpino __P((struct dinode *dp, ino_t ino));
+void dumpino __P((struct dinode *dp, dump_ino_t ino));
#ifdef __linux__
-void dumpdirino __P((struct dinode *dp, ino_t ino));
+void dumpdirino __P((struct dinode *dp, dump_ino_t ino));
#endif
-void dumpmap __P((char *map, int type, ino_t ino));
-void writeheader __P((ino_t ino));
+void dumpmap __P((char *map, int type, dump_ino_t ino));
+void writeheader __P((dump_ino_t ino));
/* tape writing routines */
int alloctape __P((void));
void getfstab __P((void));
const char *rawname __P((const char *cp));
-struct dinode *getino __P((ino_t inum));
+struct dinode *getino __P((dump_ino_t inum));
/* rdump routines */
#ifdef RDUMP
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.36 2001/03/20 09:14:58 stelian Exp $";
+ "$Id: main.c,v 1.37 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
static void obsolete __P((int *, char **[]));
static void usage __P((void));
-ino_t iexclude_list[IEXCLUDE_MAXNUM]; /* the inode exclude list */
+dump_ino_t iexclude_list[IEXCLUDE_MAXNUM];/* the inode exclude list */
int iexclude_num = 0; /* number of elements in the list */
int
main(int argc, char *argv[])
{
- register ino_t ino;
+ register dump_ino_t ino;
register int dirty;
register struct dinode *dp;
register struct fstab *dt;
register char *map;
register int ch;
int i, anydirskipped, bflag = 0, Tflag = 0, honorlevel = 1;
- ino_t maxino;
+ dump_ino_t maxino;
#ifdef __linux__
errcode_t retval;
char directory[MAXPATHLEN];
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.35 2001/03/20 09:14:58 stelian Exp $";
+ "$Id: tape.c,v 1.36 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
spcl.c_flags |= DR_NEWHEADER;
if (compressed)
spcl.c_flags |= DR_COMPRESSED;
- writeheader((ino_t)slp->inode);
+ writeheader((dump_ino_t)slp->inode);
spcl.c_flags &=~ DR_NEWHEADER;
msg("Volume %d started with block %ld at: %s", tapeno,
spcl.c_tapea, ctime(&tstart_volume));
#ifndef lint
static const char rcsid[] =
- "$Id: traverse.c,v 1.27 2001/03/20 09:14:58 stelian Exp $";
+ "$Id: traverse.c,v 1.28 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
static int searchdir __P((struct ext2_dir_entry *dp, int offset,
int blocksize, char *buf, void *private));
#else
-static int dirindir __P((ino_t ino, daddr_t blkno, int level, long *size));
-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));
+static int dirindir __P((dump_ino_t ino, daddr_t blkno, int level, long *size));
+static void dmpindir __P((dump_ino_t ino, daddr_t blk, int level, fsizeT *size));
+static int searchdir __P((dump_ino_t ino, daddr_t blkno, long size, long filesize));
#endif
-static void mapfileino __P((ino_t ino, struct dinode const *dp, long *tapesize, int *dirskipped));
-static int exclude_ino __P((ino_t ino));
-extern ino_t iexclude_list[IEXCLUDE_MAXNUM]; /* the inode exclude list */
+static void mapfileino __P((dump_ino_t ino, struct dinode const *dp, long *tapesize, int *dirskipped));
+static int exclude_ino __P((dump_ino_t ino));
+extern dump_ino_t iexclude_list[IEXCLUDE_MAXNUM]; /* the inode exclude list */
extern int iexclude_num; /* number of elements in list */
/* Temporary fix waiting for Andreas fixes... */
}
else if (es->s_feature_compat &
EXT3_FEATURE_COMPAT_HAS_JOURNAL &&
- journal_ino && !exclude_ino(journal_ino)) {
- iexclude_list[iexclude_num++] = journal_ino;
+ journal_ino &&
+ !exclude_ino((dump_ino_t)journal_ino)) {
+ iexclude_list[iexclude_num++] = (dump_ino_t)journal_ino;
msg("Added ext3 journal inode %d to exclude list\n",
journal_ino);
}
* This tests whether an inode is in the exclude list
*/
int
-exclude_ino(ino_t ino)
+exclude_ino(dump_ino_t ino)
{
/* 04-Feb-00 ILC */
if (iexclude_num) { /* if there are inodes in the exclude list */
* copy of the given inode, or be NULL (in which case it is fetched.)
*/
static void
-mapfileino(ino_t ino, struct dinode const *dp, long *tapesize, int *dirskipped)
+mapfileino(dump_ino_t ino, struct dinode const *dp, long *tapesize, int *dirskipped)
{
register int mode;
*/
#ifdef __linux__
int
-mapfiles(ino_t maxino, long *tapesize)
+mapfiles(dump_ino_t maxino, long *tapesize)
{
ext2_ino_t ino;
int anydirskipped = 0;
}
#else
int
-mapfiles(ino_t maxino, long *tapesize)
+mapfiles(dump_ino_t maxino, long *tapesize)
{
- register ino_t ino;
+ register dump_ino_t ino;
int anydirskipped = 0;
for (ino = ROOTINO; ino < maxino; ino++)
* the directories in the filesystem.
*/
int
-mapfilesfromdir(ino_t maxino, long *tapesize, char *directory)
+mapfilesfromdir(dump_ino_t maxino, long *tapesize, char *directory)
{
errcode_t retval;
struct mapfile_context mfc;
* pass using this algorithm.
*/
int
-mapdirs(ino_t maxino, long *tapesize)
+mapdirs(dump_ino_t maxino, long *tapesize)
{
register struct dinode *dp;
register int isdir;
register char *map;
- register ino_t ino;
+ register dump_ino_t ino;
#ifndef __linux__
register int i;
long filesize;
* require the directory to be dumped.
*/
static int
-dirindir(ino_t ino, daddr_t blkno, int ind_level, long *filesize)
+dirindir(dump_ino_t ino, daddr_t blkno, int ind_level, long *filesize)
{
int ret = 0;
register int i;
#else /* __linux__ */
static int
-searchdir(ino_t ino, daddr_t blkno, long size, long filesize)
+searchdir(dump_ino_t ino, daddr_t blkno, long size, long filesize)
{
register struct direct *dp;
register long loc, ret = 0;
#ifdef __linux__
struct block_context {
- ino_t ino;
+ ext2_ino_t ino;
int *buf;
int cnt;
int max;
* Dump the contents of an inode to tape.
*/
void
-dumpino(struct dinode *dp, ino_t ino)
+dumpino(struct dinode *dp, dump_ino_t ino)
{
unsigned long cnt;
fsizeT size;
bc.ino = ino;
bc.next_block = NDADDR;
- ext2fs_block_iterate2(fs, ino, 0, NULL, dumponeblock, (void *)&bc);
+ ext2fs_block_iterate2(fs, (ext2_ino_t)ino, 0, NULL, dumponeblock, (void *)&bc);
if (bc.cnt > 0) {
blksout (bc.buf, bc.cnt, bc.ino);
}
* Dumps a directory to tape after converting it to the BSD format
*/
void
-dumpdirino(struct dinode *dp, ino_t ino)
+dumpdirino(struct dinode *dp, dump_ino_t ino)
{
fsizeT size;
char buf[TP_BSIZE];
cdc.prev_offset = 0;
cdc.bs = MIN(DIRBLKSIZ, TP_BSIZE);
/* Do the conversion */
- retval = ext2fs_dir_iterate(fs, ino, 0, NULL, convert_dir, (void *)&cdc);
+ retval = ext2fs_dir_iterate(fs, (ext2_ino_t)ino, 0, NULL, convert_dir, (void *)&cdc);
if (retval) {
com_err(disk, retval, "while converting directory #%ld\n", (long)ino);
exit(X_ABORT);
* 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(dump_ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
{
int i, cnt;
#ifdef __linux__
* Collect up the data into tape record sized buffers and output them.
*/
void
-blksout(daddr_t *blkp, int frags, ino_t ino)
+blksout(daddr_t *blkp, int frags, dump_ino_t ino)
{
register daddr_t *bp;
int i, j, count, blks, tbperdb;
* Dump a map to the tape.
*/
void
-dumpmap(char *map, int type, ino_t ino)
+dumpmap(char *map, int type, dump_ino_t ino)
{
register int i;
char *cp;
#define int32_t __s32
#endif
void
-writeheader(ino_t ino)
+writeheader(dump_ino_t ino)
{
register int32_t sum, cnt, *lp;
#ifdef __linux__
struct dinode *
-getino(ino_t inum)
+getino(dump_ino_t inum)
{
static struct dinode dinode;
errcode_t err;
curino = inum;
- err = ext2fs_read_inode(fs, inum, (struct ext2_inode *) &dinode);
+ err = ext2fs_read_inode(fs, (ext2_ino_t)inum, (struct ext2_inode *) &dinode);
if (err) {
com_err(disk, err, "while reading inode #%ld\n", (long)inum);
exit(X_ABORT);
}
#else /* __linux__ */
struct dinode *
-getino(ino_t inum)
+getino(dump_ino_t inum)
{
static daddr_t minino, maxino;
static struct dinode inoblock[MAXINOPB];
#ifndef lint
static const char rcsid[] =
- "$Id: dirs.c,v 1.13 2000/12/21 11:14:54 stelian Exp $";
+ "$Id: dirs.c,v 1.14 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
#define INOHASH(val) (val % HASHSIZE)
struct inotab {
struct inotab *t_next;
- ino_t t_ino;
+ dump_ino_t t_ino;
int32_t t_seekpt;
int32_t t_size;
};
* Information retained about directories.
*/
struct modeinfo {
- ino_t ino;
+ dump_ino_t ino;
struct timeval timep[2];
mode_t mode;
uid_t uid;
};
#ifdef __linux__
-static struct inotab *allocinotab __P((ino_t, struct new_bsd_inode *, long));
+static struct inotab *allocinotab __P((dump_ino_t, struct new_bsd_inode *, long));
#else
-static struct inotab *allocinotab __P((ino_t, struct dinode *, long));
+static struct inotab *allocinotab __P((dump_ino_t, struct dinode *, long));
#endif
static void dcvt __P((struct odirect *, struct direct *));
static void flushent __P((void));
-static struct inotab *inotablookup __P((ino_t));
+static struct inotab *inotablookup __P((dump_ino_t));
static RST_DIR *opendirfile __P((const char *));
static void putdir __P((char *, size_t));
static void putent __P((struct direct *));
static void rst_seekdir __P((RST_DIR *, long, long));
static long rst_telldir __P((RST_DIR *));
-static struct direct *searchdir __P((ino_t, char *));
+static struct direct *searchdir __P((dump_ino_t, char *));
/*
* Extract directory contents, building up a directory structure
* pname and pass them off to be processed.
*/
void
-treescan(char *pname, ino_t ino, long (*todo) __P((char *, ino_t, int)))
+treescan(char *pname, dump_ino_t ino, long (*todo) __P((char *, dump_ino_t, int)))
{
register struct inotab *itp;
register struct direct *dp;
struct direct *
pathsearch(const char *pathname)
{
- ino_t ino;
+ dump_ino_t ino;
struct direct *dp;
char *path, *name, buffer[MAXPATHLEN];
* Return its inode number if found, zero if it does not exist.
*/
static struct direct *
-searchdir(ino_t inum, char *name)
+searchdir(dump_ino_t inum, char *name)
{
register struct direct *dp;
register struct inotab *itp;
{
struct inotab *itp;
RST_DIR *dirp;
- ino_t ino;
+ dump_ino_t ino;
if ((ino = dirlookup(name)) > 0 &&
(itp = inotablookup(ino)) != NULL) {
* Generate a literal copy of a directory.
*/
int
-genliteraldir(char *name, ino_t ino)
+genliteraldir(char *name, dump_ino_t ino)
{
register struct inotab *itp;
int ofile, dp, i, size;
* Determine the type of an inode
*/
int
-inodetype(ino_t ino)
+inodetype(dump_ino_t ino)
{
struct inotab *itp;
*/
static struct inotab *
#ifdef __linux__
-allocinotab(ino_t ino, struct new_bsd_inode *dip, long seekpt)
+allocinotab(dump_ino_t ino, struct new_bsd_inode *dip, long seekpt)
#else
-allocinotab(ino_t ino, struct dinode *dip, long seekpt)
+allocinotab(dump_ino_t ino, struct dinode *dip, long seekpt)
#endif
{
register struct inotab *itp;
* Look up an inode in the table of directories
*/
static struct inotab *
-inotablookup(ino_t ino)
+inotablookup(dump_ino_t ino)
{
register struct inotab *itp;
* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
*
- * $Id: extern.h,v 1.11 2000/12/21 11:14:54 stelian Exp $
+ * $Id: extern.h,v 1.12 2001/03/20 10:02:48 stelian Exp $
*/
/*-
#include <config.h>
-struct entry *addentry __P((char *, ino_t, int));
-long addfile __P((char *, ino_t, int));
+struct entry *addentry __P((char *, dump_ino_t, int));
+long addfile __P((char *, dump_ino_t, int));
int addwhiteout __P((char *));
void badentry __P((struct entry *, const char *));
void canon __P((char *, char *, int));
void createfiles __P((void));
void createleaves __P((char *));
void createlinks __P((void));
-long deletefile __P((char *, ino_t, int));
-void deleteino __P((ino_t));
+long deletefile __P((char *, dump_ino_t, int));
+void deleteino __P((dump_ino_t));
void delwhiteout __P((struct entry *));
-ino_t dirlookup __P((const char *));
+dump_ino_t dirlookup __P((const char *));
void dumpsymtable __P((char *, long));
void extractdirs __P((int));
int extractfile __P((char *));
char *flagvalues __P((struct entry *));
void freeentry __P((struct entry *));
void freename __P((char *));
-int genliteraldir __P((char *, ino_t));
+int genliteraldir __P((char *, dump_ino_t));
char *gentempname __P((struct entry *));
void getfile __P((void (*)(char *, size_t), void (*)(char *, size_t)));
void getvol __P((long));
void initsymtable __P((char *));
-int inodetype __P((ino_t));
+int inodetype __P((dump_ino_t));
int linkit __P((char *, char *, int));
-struct entry *lookupino __P((ino_t));
+struct entry *lookupino __P((dump_ino_t));
struct entry *lookupname __P((char *));
-long listfile __P((char *, ino_t, int));
-ino_t lowerbnd __P((ino_t));
+long listfile __P((char *, dump_ino_t, int));
+dump_ino_t lowerbnd __P((dump_ino_t));
void mktempname __P((struct entry *));
void moveentry __P((struct entry *, char *));
void msg __P((const char *, ...));
char *myname __P((struct entry *));
void newnode __P((struct entry *));
void newtapebuf __P((long));
-long nodeupdates __P((char *, ino_t, int));
+long nodeupdates __P((char *, dump_ino_t, int));
void onintr __P((int));
void panic __P((const char *, ...));
void pathcheck __P((char *));
void skipfile __P((void));
void skipmaps __P((void));
void swabst __P((u_char *, u_char *));
-void treescan __P((char *, ino_t, long (*)(char *, ino_t, int)));
-ino_t upperbnd __P((ino_t));
-long verifyfile __P((char *, ino_t, int));
+void treescan __P((char *, dump_ino_t, long (*)(char *, dump_ino_t, int)));
+dump_ino_t upperbnd __P((dump_ino_t));
+long verifyfile __P((char *, dump_ino_t, int));
void xtrnull __P((char *, size_t));
/* From ../dump/dumprmt.c */
#ifndef lint
static const char rcsid[] =
- "$Id: interactive.c,v 1.15 2000/12/21 11:14:54 stelian Exp $";
+ "$Id: interactive.c,v 1.16 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
* Structure and routines associated with listing directories.
*/
struct afile {
- ino_t fnum; /* inode number of file */
+ dump_ino_t fnum; /* inode number of file */
char *fname; /* file name */
short len; /* name length */
char prefix; /* prefix character */
runcmdshell(void)
{
register struct entry *np;
- ino_t ino;
+ dump_ino_t ino;
struct arglist arglist;
char curdir[MAXPATHLEN];
char name[MAXPATHLEN];
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.17 2001/03/20 09:14:58 stelian Exp $";
+ "$Id: main.c,v 1.18 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
long ntrec;
char *dumpmap;
char *usedinomap;
-ino_t maxino;
+dump_ino_t maxino;
time_t dumptime;
time_t dumpdate;
FILE *terminal;
main(int argc, char *argv[])
{
int ch;
- ino_t ino;
+ dump_ino_t ino;
char *inputdev = _PATH_DEFTAPE;
char *symtbl = "./restoresymtable";
char *p, name[MAXPATHLEN];
#ifndef lint
static const char rcsid[] =
- "$Id: restore.c,v 1.13 2000/12/21 11:14:54 stelian Exp $";
+ "$Id: restore.c,v 1.14 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
* List entries on the tape.
*/
long
-listfile(char *name, ino_t ino, int type)
+listfile(char *name, dump_ino_t ino, int type)
{
long descend = hflag ? GOOD : FAIL;
* Request that new entries be extracted.
*/
long
-addfile(char *name, ino_t ino, int type)
+addfile(char *name, dump_ino_t ino, int type)
{
register struct entry *ep, *np;
long descend = hflag ? GOOD : FAIL;
*/
/* ARGSUSED */
long
-deletefile(char *name, ino_t ino, int type)
+deletefile(char *name, dump_ino_t ino, int type)
{
long descend = hflag ? GOOD : FAIL;
struct entry *ep;
removeoldleaves(void)
{
register struct entry *ep, *nextep;
- register ino_t i, mydirino;
+ register dump_ino_t i, mydirino;
Vprintf(stdout, "Mark entries to be removed.\n");
if ((ep = lookupino(WINO))) {
* Renames are done at the same time.
*/
long
-nodeupdates(char *name, ino_t ino, int type)
+nodeupdates(char *name, dump_ino_t ino, int type)
{
register struct entry *ep, *np, *ip;
long descend = GOOD;
findunreflinks(void)
{
register struct entry *ep, *np;
- register ino_t i;
+ register dump_ino_t i;
Vprintf(stdout, "Find unreferenced names.\n");
for (i = ROOTINO; i < maxino; i++) {
compareleaves(void)
{
register struct entry *ep;
- ino_t first;
+ dump_ino_t first;
long curvol;
first = lowerbnd(ROOTINO);
createleaves(char *symtabfile)
{
register struct entry *ep;
- ino_t first;
+ dump_ino_t first;
long curvol;
if (command == 'R') {
void
createfiles(void)
{
- register ino_t first, next, last;
+ register dump_ino_t first, next, last;
register struct entry *ep;
long curvol;
createlinks(void)
{
register struct entry *np, *ep;
- register ino_t i;
+ register dump_ino_t i;
char name[BUFSIZ];
if ((ep = lookupino(WINO))) {
checkrestore(void)
{
register struct entry *ep;
- register ino_t i;
+ register dump_ino_t i;
Vprintf(stdout, "Check the symbol table.\n");
for (i = WINO; i < maxino; i++) {
* A paranoid check that things are as they should be.
*/
long
-verifyfile(char *name, ino_t ino, int type)
+verifyfile(char *name, dump_ino_t ino, int type)
{
struct entry *np, *ep;
long descend = GOOD;
* Stelian Pop <pop@noos.fr>, 1999-2000
* Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
*
- * $Id: restore.h,v 1.13 2001/02/21 16:13:05 stelian Exp $
+ * $Id: restore.h,v 1.14 2001/03/20 10:02:48 stelian Exp $
*/
/*
*/
extern char *dumpmap; /* map of inodes on this dump tape */
extern char *usedinomap; /* map of inodes that are in use on this fs */
-extern ino_t maxino; /* highest numbered inode in this file system */
+extern dump_ino_t maxino; /* highest numbered inode in this file system */
extern long dumpnum; /* location of the dump on this tape */
extern long volno; /* current volume being read */
extern long ntrec; /* number of TP_BSIZE records per tape block */
u_char e_namlen; /* length of this name */
char e_type; /* type of this entry, see below */
short e_flags; /* status flags, see below */
- ino_t e_ino; /* inode number in previous file sys */
+ dump_ino_t e_ino; /* inode number in previous file sys */
long e_index; /* unique index (for dumpped table) */
struct entry *e_parent; /* pointer to parent directory (..) */
struct entry *e_sibling; /* next element in this directory (.) */
*/
struct context {
char *name; /* name of file */
- ino_t ino; /* inumber of file */
+ dump_ino_t ino; /* inumber of file */
#ifdef __linux__
struct new_bsd_inode *dip; /* pointer to inode */
#else
#ifndef lint
static const char rcsid[] =
- "$Id: symtab.c,v 1.12 2000/12/21 11:14:54 stelian Exp $";
+ "$Id: symtab.c,v 1.13 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
/*
static struct entry **entry;
static long entrytblsize;
-static void addino __P((ino_t, struct entry *));
+static void addino __P((dump_ino_t, struct entry *));
static struct entry *lookupparent __P((char *));
static void removeentry __P((struct entry *));
* Look up an entry by inode number
*/
struct entry *
-lookupino(ino_t inum)
+lookupino(dump_ino_t inum)
{
register struct entry *ep;
* Add an entry into the entry table
*/
static void
-addino(ino_t inum, struct entry *np)
+addino(dump_ino_t inum, struct entry *np)
{
struct entry **epp;
* Delete an entry from the entry table
*/
void
-deleteino(ino_t inum)
+deleteino(dump_ino_t inum)
{
register struct entry *next;
struct entry **prev;
* add an entry to the symbol table
*/
struct entry *
-addentry(char *name, ino_t inum, int type)
+addentry(char *name, dump_ino_t inum, int type)
{
register struct entry *np, *ep;
freeentry(struct entry *ep)
{
register struct entry *np;
- ino_t inum;
+ dump_ino_t inum;
if (ep->e_flags != REMOVED)
badentry(ep, "not marked REMOVED");
int32_t entrytblsize;
time_t dumptime;
time_t dumpdate;
- ino_t maxino;
+ dump_ino_t maxino;
int32_t ntrec;
};
dumpsymtable(char *filename, long checkpt)
{
register struct entry *ep, *tep;
- register ino_t i;
+ register dump_ino_t i;
struct entry temp, *tentry;
long mynum = 1, stroff = 0;
FILE *fd;
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.28 2001/03/20 09:14:58 stelian Exp $";
+ "$Id: tape.c,v 1.29 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
static void
accthdr(struct s_spcl *header)
{
- static ino_t previno = 0x7fffffff;
+ static dump_ino_t previno = 0x7fffffff;
static int prevtype;
static long predict;
long blks, i;
#ifndef lint
static const char rcsid[] =
- "$Id: utilities.c,v 1.12 2001/03/19 13:22:49 stelian Exp $";
+ "$Id: utilities.c,v 1.13 2001/03/20 10:02:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
/*
* find lowest number file (above "start") that needs to be extracted
*/
-ino_t
-lowerbnd(ino_t start)
+dump_ino_t
+lowerbnd(dump_ino_t start)
{
register struct entry *ep;
/*
* find highest number file (below "start") that needs to be extracted
*/
-ino_t
-upperbnd(ino_t start)
+dump_ino_t
+upperbnd(dump_ino_t start)
{
register struct entry *ep;
/*
* Check to see if a name is on a dump tape.
*/
-ino_t
+dump_ino_t
dirlookup(const char *name)
{
struct direct *dp;
- ino_t ino;
+ dump_ino_t ino;
ino = ((dp = pathsearch(name)) == NULL) ? 0 : dp->d_ino;