]> git.wh0rd.org - dump.git/blobdiff - restore/tape.c
Use minor()/major() instead of "& 0xff" in order to be 32 bit compliant
[dump.git] / restore / tape.c
index b4fa15d93c8cdc9882f6a112524253614c6ee1d2..cc98e716d69566c55d78fede7fb94360d15622e2 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.75 2003/10/26 16:05:48 stelian Exp $";
+       "$Id: tape.c,v 1.78 2004/01/28 10:02:35 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -413,13 +413,19 @@ setup(void)
                dump_ino_t oldmaxino = maxino;
                maxino += (spcl.c_count * TP_BSIZE * NBBY) + 1;
                resizemaps(oldmaxino, maxino);
+               map = usedinomap;
 
                spcl.c_dinode.di_size = spcl.c_count * TP_BSIZE;
                getfile(xtrmap, xtrmapskip);
        }
        Dprintf(stdout, "maxino = %lu\n", (unsigned long)maxino);
-       if (spcl.c_type != TS_BITS)
+       if (spcl.c_type != TS_BITS) {
+               if (spcl.c_type == TS_END) {
+                       msg("Cannot find file dump list, assuming empty tape\n");
+                       exit(0);
+               }
                errx(1, "Cannot find file dump list");
+       }
        map = calloc((unsigned)1, (unsigned)howmany(maxino, NBBY));
        if (map == (char *)NULL)
                errx(1, "no memory for file dump list");
@@ -1000,12 +1006,10 @@ extractfinderinfoufs(char *name)
        int flags;
        mode_t mode;
        struct timeval timep[2];
-       struct entry *ep;
-       int     sz;
-       attrinfo_block_t gABuf;
        u_int32_t       uid;
        u_int32_t       gid;
        char    path[MAXPATHLEN], fname[MAXPATHLEN];
+       int toto;
 
        curfile.name = name;
        curfile.action = USING;
@@ -1639,10 +1643,10 @@ comparefile(char *name)
                        fprintf(stderr,
                                "%s: device changed from %d,%d to %d,%d.\n",
                                name,
-                               ((int)curfile.dip->di_rdev >> 8) & 0xff,
-                               (int)curfile.dip->di_rdev & 0xff,
-                               ((int)sb.st_rdev >> 8) & 0xff,
-                               (int)sb.st_rdev & 0xff);
+                               major(curfile.dip->di_rdev),
+                               minor(curfile.dip->di_rdev),
+                               major(sb.st_rdev),
+                               minor(sb.st_rdev));
                        do_compare_error;
                }
                skipfile();