]> git.wh0rd.org - dump.git/commitdiff
Cosmetic changes to QFA code / time.h headers.
authorStelian Pop <stelian@popies.net>
Tue, 24 Apr 2001 10:59:12 +0000 (10:59 +0000)
committerStelian Pop <stelian@popies.net>
Tue, 24 Apr 2001 10:59:12 +0000 (10:59 +0000)
dump/main.c
dump/tape.c
restore/main.c
restore/symtab.c
restore/utilities.c

index d3ebc8285a73dc58ce9c2519a4be01dd6f8e9fdf..506c270cbf09a221f5cfffdf1a202f9306a4a223 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.45 2001/04/12 16:03:29 stelian Exp $";
+       "$Id: main.c,v 1.46 2001/04/24 10:59:12 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -91,7 +91,7 @@ int   ntrec = NTREC;  /* # tape blocks in each tape record */
 int    cartridge = 0;  /* Assume non-cartridge tape */
 #ifdef USE_QFA
 int    tapepos = 0;    /* assume no QFA tapeposition needed by user */
-#endif /* USA_QFA */
+#endif /* USE_QFA */
 int    dokerberos = 0; /* Use Kerberos authentication */
 long   dev_bsize = 1;  /* recalculated below */
 long   blocksperfile;  /* output blocks per file */
@@ -160,7 +160,7 @@ main(int argc, char *argv[])
 
 #ifdef USE_QFA
        gTapeposfd = -1;
-#endif /* USA_QFA */
+#endif /* USE_QFA */
 
        while ((ch = getopt(argc, argv,
                            "0123456789aB:b:cd:e:f:F:h:L:"
@@ -282,7 +282,7 @@ main(int argc, char *argv[])
                        gTapeposfile = optarg;
                        tapepos = 1;
                        break;
-#endif /* USA_QFA */
+#endif /* USE_QFA */
                        
                case 's':               /* tape size, feet */
                        unlimited = 0;
index 74bbcbd8d20b63185d25f813befc19b57036a648..cf1f5fbc4c6287eb02693aca60382d06d7acbddd 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.43 2001/04/12 16:03:29 stelian Exp $";
+       "$Id: tape.c,v 1.44 2001/04/24 10:59:12 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -1056,7 +1056,7 @@ doslave(int cmd, int slave_number)
        long curtapepos;
        union u_spcl *uspclptr;
        struct s_spcl *spclptr;
-#endif /* USA_QFA */
+#endif /* USE_QFA */
 
        /*
         * Need our own seek pointer.
@@ -1108,29 +1108,6 @@ doslave(int cmd, int slave_number)
                        }
                }
 
-#ifdef USE_QFA
-               if (gTapeposfd >= 0) {
-                       uspclptr = (union u_spcl *)&slp->tblock[0];
-                       spclptr = &uspclptr->s_spcl;
-                       if ((spclptr->c_magic == NFS_MAGIC) && 
-                           (spclptr->c_type == TS_INODE)) {
-                               /* if an error occured previously don't
-                                * try again */
-                               if (gtperr == 0) {
-                                       if ((gtperr = GetTapePos(&curtapepos)) == 0) {
-#ifdef DEBUG_QFA
-                                               msg("inode %ld at tapepos %ld\n", spclptr->c_inumber, curtapepos);
-#endif
-                                               sprintf(gTps, "%ld\t%d\t%ld\n", (unsigned long)spclptr->c_inumber, tapeno, curtapepos);
-                                               if (write(gTapeposfd, gTps, strlen(gTps)) != strlen(gTps)) {
-                                                       quit("error writing tapepos file.\n");
-                                               }
-                                       }
-                               }
-                       }
-               }
-#endif /* USE_QFA */
-                                               
                /* Try to write the data... */
                wrote = 0;
                eot_count = 0;
@@ -1187,6 +1164,29 @@ doslave(int cmd, int slave_number)
                ready = 0;
                caught = 0;
 
+#ifdef USE_QFA
+               if (gTapeposfd >= 0) {
+                       uspclptr = (union u_spcl *)&slp->tblock[0];
+                       spclptr = &uspclptr->s_spcl;
+                       if ((spclptr->c_magic == NFS_MAGIC) && 
+                           (spclptr->c_type == TS_INODE)) {
+                               /* if an error occured previously don't
+                                * try again */
+                               if (gtperr == 0) {
+                                       if ((gtperr = GetTapePos(&curtapepos)) == 0) {
+#ifdef DEBUG_QFA
+                                               msg("inode %ld at tapepos %ld\n", spclptr->c_inumber, curtapepos);
+#endif
+                                               sprintf(gTps, "%ld\t%d\t%ld\n", (unsigned long)spclptr->c_inumber, tapeno, curtapepos);
+                                               if (write(gTapeposfd, gTps, strlen(gTps)) != strlen(gTps)) {
+                                                       warn("error writing tapepos file.\n");
+                                               }
+                                       }
+                               }
+                       }
+               }
+#endif /* USE_QFA */
+                                               
                while (eot_count < 10 && size < bufsize) {
 #ifdef RDUMP
                        if (host)
index 8911d2069475a9366848a7644d17324f7db88d88..64870e69196695421a376cd3af4071a60e8e07d5 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.20 2001/04/10 12:46:53 stelian Exp $";
+       "$Id: main.c,v 1.21 2001/04/24 10:59:13 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -50,6 +50,8 @@ static const char rcsid[] =
 #include <errno.h>
 
 #ifdef __linux__
+#include <sys/time.h>
+#include <time.h>
 #ifdef HAVE_EXT2FS_EXT2_FS_H
 #include <ext2fs/ext2_fs.h>
 #else
@@ -484,11 +486,18 @@ usage(void)
 #else
 #define kerbflag
 #endif
+
+#ifdef USE_QFA
+#define qfaflag "[-Q file] "
+#else
+#define qfaflag
+#endif
+
        (void)fprintf(stderr,
          "usage:\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n",
          __progname, " -C [-c" kerbflag "Mvy] [-b blocksize] [-D filesystem] [-f file] [-s fileno]",
          __progname, " -i [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-s fileno]",
-         __progname, " -r [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-T directory]",
+         __progname, " -r [-c" kerbflag "Muvy] [-b blocksize] [-f file] " qfaflag "[-s fileno] [-T directory]",
          __progname, " -R [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-T directory]",
          __progname, " -t [-ch" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-X filelist] [file ...]",
          __progname, " -x [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-s fileno] [-X filelist] [file ...]");
index abf8d7ae6fca904e02cf3c55e96cdd0ad20a92e2..4cabfb567bc0b44401089640e7a03bee9a05b2ad 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: symtab.c,v 1.13 2001/03/20 10:02:48 stelian Exp $";
+       "$Id: symtab.c,v 1.14 2001/04/24 10:59:13 stelian Exp $";
 #endif /* not lint */
 
 /*
@@ -59,6 +59,7 @@ static const char rcsid[] =
 
 #ifdef __linux__
 #include <sys/time.h>
+#include <time.h>
 #include <linux/ext2_fs.h>
 #include <bsdcompat.h>
 #else  /* __linux__ */
index e2bf2e2682f955f18df33bc80661ab32ab53f1ee..95cb2160acb619896fd2b36ef81e76eb93c29487 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: utilities.c,v 1.14 2001/04/10 12:46:53 stelian Exp $";
+       "$Id: utilities.c,v 1.15 2001/04/24 10:59:13 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -56,6 +56,7 @@ static const char rcsid[] =
 
 #ifdef __linux__
 #include <sys/time.h>
+#include <time.h>
 #include <linux/ext2_fs.h>
 #include <ext2fs/ext2fs.h>
 #include <bsdcompat.h>