]> git.wh0rd.org - dump.git/blobdiff - dump/tape.c
Do not seek for every dump block, only for each ntrec blocks.
[dump.git] / dump / tape.c
index 5fa739c01302ee9d8481fb8e7b3f83fdd0d47743..97565d1522975e6f7ebc97ad8478eebb5c9dcd07 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.62 2002/01/25 15:08:59 stelian Exp $";
+       "$Id: tape.c,v 1.64 2002/02/27 09:47:48 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -1234,18 +1234,23 @@ doslave(int cmd, int slave_number, int first)
 #ifdef USE_QFA
                if (gTapeposfd >= 0) {
                        int i;
+                       int firstpass = 1;
                        for (i = 0; i < ntrec; ++i) {
                                uspclptr = (union u_spcl *)&slp->tblock[i];
                                spclptr = &uspclptr->s_spcl;
                                if ((spclptr->c_magic == NFS_MAGIC) && 
                                    (spclptr->c_type == TS_INODE) &&
+                                   ((spclptr->c_dinode.di_mode & S_IFMT) != IFDIR) &&
                                    (spclptr->c_date == gThisDumpDate)) {
                                        /* if an error occured previously don't
                                         * try again */
-                                       if (gtperr == 0) {
-                                               if ((gtperr = GetTapePos(&curtapepos)) == 0)
-                                                       MkTapeString(spclptr, curtapepos);
+                                       if (firstpass) {
+                                               firstpass = 0;
+                                               if (gtperr == 0) 
+                                                       gtperr = GetTapePos(&curtapepos);
                                        }
+                                       if (gtperr == 0)
+                                                       MkTapeString(spclptr, curtapepos);
                                }
                        }
                }