]> git.wh0rd.org - dump.git/blobdiff - dump/itime.c
prepare for 0.4b28pre1 release.
[dump.git] / dump / itime.c
index 836b6ae09bb7b4710069c16a68406e55b84d5bce..204fc58fdeb5f5a22e76f71a621757989f412ffa 100644 (file)
@@ -2,8 +2,8 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *     Stelian Pop <pop@noos.fr>, 1999-2000
- *     Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
+ *     Stelian Pop <stelian@popies.net>, 1999-2000
+ *     Stelian Pop <stelian@popies.net> - Alcôve <www.alcove.com>, 2000-2002
  */
 
 /*-
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: itime.c,v 1.16 2001/03/19 13:22:48 stelian Exp $";
+       "$Id: itime.c,v 1.22 2002/01/25 15:08:59 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -55,10 +55,14 @@ static const char rcsid[] =
 
 #include <sys/param.h>
 #include <sys/time.h>
+#include <time.h>
 #ifdef __linux__
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
 #include <linux/ext2_fs.h>
+#endif
 #include <ext2fs/ext2fs.h>
-#include <time.h>
 #include <bsdcompat.h>
 #include <sys/file.h>
 #include <unistd.h>
@@ -127,8 +131,8 @@ initdumptimes(int createdumpdates)
 static void
 readdumptimes(FILE *df)
 {
-       register int i;
-       register struct dumptime *dtwalk;
+       int i;
+       struct  dumptime *dtwalk;
 
        for (;;) {
                dtwalk = (struct dumptime *)calloc(1, sizeof (struct dumptime));
@@ -154,8 +158,8 @@ readdumptimes(FILE *df)
 void
 getdumptime(int createdumpdates)
 {
-       register struct dumpdates *ddp;
-       register int i;
+       struct dumpdates *ddp;
+       int i;
 
 #ifdef FDEBUG
        msg("Looking for name %s in dumpdates = %s for level = %c\n",
@@ -182,11 +186,7 @@ getdumptime(int createdumpdates)
                        continue;
                if (ddp->dd_level >= level)
                        continue;
-#ifdef __linux__
                if (ddp->dd_ddate <= (time_t)spcl.c_ddate)
-#else
-               if (ddp->dd_ddate <= spcl.c_ddate)
-#endif
                        continue;
                spcl.c_ddate = ddp->dd_ddate;
                lastlevel = ddp->dd_level;
@@ -197,8 +197,8 @@ void
 putdumptime(void)
 {
        FILE *df;
-       register struct dumpdates *dtwalk;
-       register int i;
+       struct dumpdates *dtwalk;
+       int i;
        int fd;
 
        if(uflag == 0)
@@ -244,12 +244,6 @@ putdumptime(void)
        if (ftruncate(fd, ftell(df)))
                quit("ftruncate (%s): %s\n", dumpdates, strerror(errno));
        (void) fclose(df);
-       msg("level %c dump on %s", level,
-#ifdef __linux__
-               spcl.c_date == 0 ? "the epoch\n" : ctime4(&spcl.c_date));
-#else
-               spcl.c_date == 0 ? "the epoch\n" : ctime(&spcl.c_date));
-#endif
 }
 
 static void