X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=dump%2Fitime.c;h=204fc58fdeb5f5a22e76f71a621757989f412ffa;hb=cf88ef4c26cd622c715573e07c3f1faf9e640eb5;hp=836b6ae09bb7b4710069c16a68406e55b84d5bce;hpb=43460f04f3920ae39f345a2fb39d000a890a4283;p=dump.git diff --git a/dump/itime.c b/dump/itime.c index 836b6ae..204fc58 100644 --- a/dump/itime.c +++ b/dump/itime.c @@ -2,8 +2,8 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999-2000 - * Stelian Pop - Alcôve , 2000 + * Stelian Pop , 1999-2000 + * Stelian Pop - Alcôve , 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 @@ -55,10 +55,14 @@ static const char rcsid[] = #include #include +#include #ifdef __linux__ +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else #include +#endif #include -#include #include #include #include @@ -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