X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=dump%2Fmain.c;h=58ff5c35ea87bd3fe9ac885236de59344d73495f;hp=ca30a9c03483f9d97ded33f3388a479fb97241fe;hb=8d4197bb9ba5bbcef21409231ed8903b0cac353a;hpb=ddd2ef55b78a62c4bc3daad18bef8a90e85a2052 diff --git a/dump/main.c b/dump/main.c index ca30a9c..58ff5c3 100644 --- a/dump/main.c +++ b/dump/main.c @@ -50,7 +50,7 @@ static const char copyright[] = static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$Id: main.c,v 1.3 1999/10/11 12:59:18 stelian Exp $"; + "$Id: main.c,v 1.4 1999/10/11 13:08:07 stelian Exp $"; #endif /* not lint */ #include @@ -343,7 +343,6 @@ main(int argc, char *argv[]) signal(SIGTERM, sig); if (signal(SIGINT, interrupt) == SIG_IGN) signal(SIGINT, SIG_IGN); - set_operators(); /* /etc/group snarfed */ getfstab(); /* /etc/fstab snarfed */ /* @@ -394,10 +393,17 @@ main(int argc, char *argv[]) spcl.c_level = level - '0'; spcl.c_type = TS_TAPE; if (!Tflag) - getdumptime(); /* dumpdates snarfed */ + getdumptime(uflag); /* dumpdates snarfed */ + + if (spcl.c_ddate == 0 && spcl.c_level) { + msg("WARNING: There is no inferior level dump on this filesystem\n"); + msg("WARNING: Assuming a level 0 dump by default\n"); + level = '0'; + spcl.c_level = 0; + } msg("Date of this level %c dump: %s", level, -#ifdef __linux +#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)); @@ -550,7 +556,11 @@ main(int argc, char *argv[]) "can't allocate tape buffers - try a smaller blocking factor.\n"); startnewtape(1); +#ifdef __linux__ + (void)time4(&(tstart_writing)); +#else (void)time((time_t *)&(tstart_writing)); +#endif dumpmap(usedinomap, TS_CLRI, maxino - 1); msg("dumping (Pass III) [directories]\n"); @@ -595,7 +605,11 @@ main(int argc, char *argv[]) (void)dumpino(dp, ino); } +#ifdef __linux__ + (void)time4(&(tend_writing)); +#else (void)time((time_t *)&(tend_writing)); +#endif spcl.c_type = TS_END; for (i = 0; i < ntrec; i++) writeheader(maxino - 1);