]> git.wh0rd.org - dump.git/commitdiff
Changed ino_t to dump_ino_t.
authorStelian Pop <stelian@popies.net>
Tue, 20 Mar 2001 10:02:48 +0000 (10:02 +0000)
committerStelian Pop <stelian@popies.net>
Tue, 20 Mar 2001 10:02:48 +0000 (10:02 +0000)
15 files changed:
compat/include/bsdcompat.h
compat/include/protocols/dumprestore.h
dump/dump.h
dump/main.c
dump/tape.c
dump/traverse.c
restore/dirs.c
restore/extern.h
restore/interactive.c
restore/main.c
restore/restore.c
restore/restore.h
restore/symtab.c
restore/tape.c
restore/utilities.c

index 96ce8b43ba62b2c565d6801088f7dce5d326cfa6..5afe0c7a1f03214d5d24407f373f74ab399aad76 100644 (file)
@@ -5,7 +5,7 @@
  *     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>
@@ -22,7 +22,7 @@
 #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
index f5f34d88b7f69f01db2c2cca27a17f92be917fdf..a2750cde08c2f9c413879821fe5992581ad1054a 100644 (file)
@@ -5,7 +5,7 @@
  *      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 $
  */
 
 /*
@@ -74,6 +74,8 @@
 #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 {
@@ -82,7 +84,7 @@ union u_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__
index 4e3fadaa50c0e3f9705482b16964982a08408956..5485ec4a3bd2b1454c8dacee4016d5ff113782e1 100644 (file)
@@ -5,7 +5,7 @@
  *     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 $
  */
 
 /*-
@@ -42,6 +42,7 @@
  */
 
 #include <config.h>
+#include <protocols/dumprestore.h>
 
 #define MAXINOPB       (MAXBSIZE / sizeof(struct dinode))
 #define MAXNINDIR      (MAXBSIZE / sizeof(daddr_t))
@@ -78,7 +79,7 @@ char  *eot_script;    /* end of volume script fiag */
 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 */
@@ -128,21 +129,21 @@ time_t    unctime __P((const char *str));
 /* 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));
@@ -158,7 +159,7 @@ void        dumpabort __P((int signo));
 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
index 04ec6f033e6bd7a7a8e62672f12d32dc013ec0e1..289f1e2308e39f9ff9585d6990ee4e9f61a15744 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -107,20 +107,20 @@ static long numarg __P((const char *, long, long));
 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];
index 8cf9ce18b9aab89ed0a95c0db2edbfafe604e83e..7851719381ee78f3702acbbe2fc0bc70a2f5c2e7 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -884,7 +884,7 @@ restore_check_point:
                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));
index 3da18d39a628eaa47e4abf9223fd010a9be2bea3..8e4a6b6e347f18857eb0ef982340677f3cfda0d9 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -93,13 +93,13 @@ typedef     long fsizeT;
 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... */
@@ -153,8 +153,9 @@ int dump_fs_open(const char *disk, ext2_filsys *fs)
                }
                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);
                }
@@ -216,7 +217,7 @@ blockest(struct dinode const *dp)
  * 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 */
@@ -250,7 +251,7 @@ exclude_ino(ino_t ino)
  * 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;
 
@@ -300,7 +301,7 @@ mapfileino(ino_t ino, struct dinode const *dp, long *tapesize, int *dirskipped)
  */
 #ifdef __linux__
 int
-mapfiles(ino_t maxino, long *tapesize)
+mapfiles(dump_ino_t maxino, long *tapesize)
 {
        ext2_ino_t ino;
        int anydirskipped = 0;
@@ -344,9 +345,9 @@ mapfiles(ino_t maxino, long *tapesize)
 }
 #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++)
@@ -404,7 +405,7 @@ mapfilesindir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *bu
  * 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;
@@ -483,12 +484,12 @@ struct mapdirs_context {
  * 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;
@@ -566,7 +567,7 @@ 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(dump_ino_t ino, daddr_t blkno, int ind_level, long *filesize)
 {
        int ret = 0;
        register int i;
@@ -652,7 +653,7 @@ searchdir(struct ext2_dir_entry *dp, int offset, int blocksize, char *buf, void
 #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;
@@ -694,7 +695,7 @@ searchdir(ino_t ino, daddr_t blkno, long size, long filesize)
 #ifdef __linux__
 
 struct block_context {
-       ino_t   ino;
+       ext2_ino_t ino;
        int     *buf;
        int     cnt;
        int     max;
@@ -737,7 +738,7 @@ dumponeblock(ext2_filsys fs, blk_t *blocknr, e2_blkcnt_t blockcnt,
  * 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;
@@ -858,7 +859,7 @@ dumpino(struct dinode *dp, ino_t ino)
        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);
        }
@@ -921,7 +922,7 @@ convert_dir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *buf,
  * 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];
@@ -950,7 +951,7 @@ dumpdirino(struct dinode *dp, ino_t ino)
        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);
@@ -1024,7 +1025,7 @@ dumpdirino(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(dump_ino_t ino, daddr_t blk, int ind_level, fsizeT *size)
 {
        int i, cnt;
 #ifdef __linux__
@@ -1079,7 +1080,7 @@ 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(daddr_t *blkp, int frags, dump_ino_t ino)
 {
        register daddr_t *bp;
        int i, j, count, blks, tbperdb;
@@ -1115,7 +1116,7 @@ blksout(daddr_t *blkp, int frags, ino_t ino)
  * 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;
@@ -1134,7 +1135,7 @@ dumpmap(char *map, int type, ino_t ino)
 #define int32_t __s32
 #endif
 void
-writeheader(ino_t ino)
+writeheader(dump_ino_t ino)
 {
        register int32_t sum, cnt, *lp;
 
@@ -1156,13 +1157,13 @@ writeheader(ino_t ino)
 
 #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);
@@ -1171,7 +1172,7 @@ getino(ino_t inum)
 }
 #else  /* __linux__ */
 struct dinode *
-getino(ino_t inum)
+getino(dump_ino_t inum)
 {
        static daddr_t minino, maxino;
        static struct dinode inoblock[MAXINOPB];
index eb90558ef7369819fa66eaaef4da5d86d2a3d5a1..6398f8768f399249735bb829a82aeae650b47bfb 100644 (file)
@@ -46,7 +46,7 @@
 
 #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>
@@ -87,7 +87,7 @@ static const char rcsid[] =
 #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;
 };
@@ -97,7 +97,7 @@ static struct inotab *inotab[HASHSIZE];
  * Information retained about directories.
  */
 struct modeinfo {
-       ino_t ino;
+       dump_ino_t ino;
        struct timeval timep[2];
        mode_t mode;
        uid_t uid;
@@ -137,19 +137,19 @@ struct odirect {
 };
 
 #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
@@ -246,7 +246,7 @@ skipdirs(void)
  *     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;
@@ -311,7 +311,7 @@ treescan(char *pname, ino_t ino, long (*todo) __P((char *, ino_t, int)))
 struct direct *
 pathsearch(const char *pathname)
 {
-       ino_t ino;
+       dump_ino_t ino;
        struct direct *dp;
        char *path, *name, buffer[MAXPATHLEN];
 
@@ -334,7 +334,7 @@ pathsearch(const char *pathname)
  * 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;
@@ -547,7 +547,7 @@ rst_opendir(const char *name)
 {
        struct inotab *itp;
        RST_DIR *dirp;
-       ino_t ino;
+       dump_ino_t ino;
 
        if ((ino = dirlookup(name)) > 0 &&
            (itp = inotablookup(ino)) != NULL) {
@@ -668,7 +668,7 @@ setdirmodes(int flags)
  * 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;
@@ -705,7 +705,7 @@ genliteraldir(char *name, ino_t ino)
  * Determine the type of an inode
  */
 int
-inodetype(ino_t ino)
+inodetype(dump_ino_t ino)
 {
        struct inotab *itp;
 
@@ -721,9 +721,9 @@ inodetype(ino_t ino)
  */
 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;
@@ -763,7 +763,7 @@ allocinotab(ino_t ino, struct dinode *dip, long seekpt)
  * 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;
 
index 3bf83f158d41fea32ac7e89afffba5d80cda5924..e63a136c01086f6cf3d0fc6b68c26ed7abc76926 100644 (file)
@@ -5,7 +5,7 @@
  *     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 $
  */
 
 /*-
@@ -43,8 +43,8 @@
 
 #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));
@@ -56,10 +56,10 @@ void                 compareleaves __P((void));
 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 *));
@@ -67,24 +67,24 @@ void                 findunreflinks __P((void));
 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 *));
@@ -108,9 +108,9 @@ void                 skipdirs __P((void));
 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 */
index 40c0ba55df97e0d100e693683e155cbd97a32ad7..3b184fcea3242a243f4b2a1b785518ce07f0b38f 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -97,7 +97,7 @@ static int pflag = 0;         /* prompt mode */
  * 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 */
@@ -126,7 +126,7 @@ void
 runcmdshell(void)
 {
        register struct entry *np;
-       ino_t ino;
+       dump_ino_t ino;
        struct arglist arglist;
        char curdir[MAXPATHLEN];
        char name[MAXPATHLEN];
index 703266cd6bf05f48e7c2ef74496b5c3a9db60267..9b2ea0f3abef1f0b7ee9c549a6cb2b55e271bc55 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -83,7 +83,7 @@ long  volno = 0;
 long   ntrec;
 char   *dumpmap;
 char   *usedinomap;
-ino_t  maxino;
+dump_ino_t maxino;
 time_t dumptime;
 time_t dumpdate;
 FILE   *terminal;
@@ -105,7 +105,7 @@ int
 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];
index 7197a3dd5f311885dfaf4dbf99ee53d55c17377f..bc38b655874b148c8e78f347a4ab8e5a6a287642 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -73,7 +73,7 @@ static char *keyval __P((int));
  * 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;
 
@@ -89,7 +89,7 @@ listfile(char *name, ino_t ino, int type)
  * 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;
@@ -135,7 +135,7 @@ addfile(char *name, ino_t ino, int type)
  */
 /* 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;
@@ -176,7 +176,7 @@ void
 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))) {
@@ -230,7 +230,7 @@ removeoldleaves(void)
  *     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;
@@ -542,7 +542,7 @@ void
 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++) {
@@ -633,7 +633,7 @@ void
 compareleaves(void)
 {
        register struct entry *ep;
-       ino_t first;
+       dump_ino_t first;
        long curvol;
 
        first = lowerbnd(ROOTINO);
@@ -701,7 +701,7 @@ void
 createleaves(char *symtabfile)
 {
        register struct entry *ep;
-       ino_t first;
+       dump_ino_t first;
        long curvol;
 
        if (command == 'R') {
@@ -779,7 +779,7 @@ createleaves(char *symtabfile)
 void
 createfiles(void)
 {
-       register ino_t first, next, last;
+       register dump_ino_t first, next, last;
        register struct entry *ep;
        long curvol;
 
@@ -868,7 +868,7 @@ void
 createlinks(void)
 {
        register struct entry *np, *ep;
-       register ino_t i;
+       register dump_ino_t i;
        char name[BUFSIZ];
 
        if ((ep = lookupino(WINO))) {
@@ -912,7 +912,7 @@ void
 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++) {
@@ -931,7 +931,7 @@ checkrestore(void)
  * 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;
index 562b9109306fb688d5550fa045184cd871abd96c..6c77e5afd5dda49bffef0935c3d22f73d96b16b2 100644 (file)
@@ -5,7 +5,7 @@
  *     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 $
  */
 
 /*
@@ -67,7 +67,7 @@ extern int    zflag;          /* tape is in compressed format */
  */
 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 */
@@ -93,7 +93,7 @@ struct entry {
        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 (.) */
@@ -125,7 +125,7 @@ struct entry {
  */
 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
index a72b1cbb2cab05b0f686bbd5947293218d4730c2..abf8d7ae6fca904e02cf3c55e96cdd0ad20a92e2 100644 (file)
@@ -41,7 +41,7 @@
 
 #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 */
 
 /*
@@ -91,7 +91,7 @@ static const char rcsid[] =
 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 *));
 
@@ -99,7 +99,7 @@ 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;
 
@@ -115,7 +115,7 @@ lookupino(ino_t inum)
  * 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;
 
@@ -135,7 +135,7 @@ addino(ino_t inum, struct entry *np)
  * Delete an entry from the entry table
  */
 void
-deleteino(ino_t inum)
+deleteino(dump_ino_t inum)
 {
        register struct entry *next;
        struct entry **prev;
@@ -236,7 +236,7 @@ static struct entry *freelist = NULL;
  * 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;
 
@@ -287,7 +287,7 @@ void
 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");
@@ -446,7 +446,7 @@ struct symtableheader {
        int32_t entrytblsize;
        time_t  dumptime;
        time_t  dumpdate;
-       ino_t   maxino;
+       dump_ino_t maxino;
        int32_t ntrec;
 };
 
@@ -457,7 +457,7 @@ void
 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;
index 1bb6d8c2d45192a6e023e85fed08b2f6962bebc7..d4a46ed78512f21c349ed99cde2d9ec464635bc8 100644 (file)
@@ -46,7 +46,7 @@
 
 #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>
@@ -1981,7 +1981,7 @@ good:
 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;
index a7164fb134697d34bd13231d9d7a6f8ae57e01ca..34f9f8d7f14c4f8bba849178577088e708d0d6c3 100644 (file)
@@ -41,7 +41,7 @@
 
 #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>
@@ -311,8 +311,8 @@ delwhiteout(struct entry *ep)
 /*
  * 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;
 
@@ -329,8 +329,8 @@ lowerbnd(ino_t start)
 /*
  * 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;
 
@@ -397,11 +397,11 @@ flagvalues(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;