* 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@cybercable.fr>, 1999-2000
- * Stelian Pop <pop@cybercable.fr> - Alcôve <www.alcove.fr>, 2000
+ * Stelian Pop <pop@noos.fr>, 1999-2000
+ * Stelian Pop <pop@noos.fr> - Alcôve <www.alcove.fr>, 2000
*/
/*-
#ifndef lint
static const char rcsid[] =
- "$Id: optr.c,v 1.15 2000/11/29 10:13:43 stelian Exp $";
+ "$Id: optr.c,v 1.20 2001/02/22 10:57:40 stelian Exp $";
#endif /* not lint */
+#include <config.h>
#include <sys/param.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <ext2fs/ext2fs.h>
#include <bsdcompat.h>
#include <signal.h>
+#include <time.h>
#endif
#include "dump.h"
void
timeest(void)
{
- time_t tnow, deltat;
+ time_t tnow;
#ifdef __linux__
(void) time4(&tnow);
(void) time((time_t *) &tnow);
#endif
if (tnow >= tschedule) {
+ char *buf = mktimeest(tnow);
tschedule = tnow + 300;
- if (blockswritten < 500)
- return;
- if (blockswritten > tapesize)
- tapesize = blockswritten;
- deltat = tstart_writing - tnow +
- (1.0 * (tnow - tstart_writing))
- / blockswritten * tapesize;
- msg("%3.2f%% done, finished in %d:%02d\n",
- (blockswritten * 100.0) / tapesize,
- deltat / 3600, (deltat % 3600) / 60);
+ if (buf) {
+ fprintf(stderr, " DUMP: ");
+ fwrite(buf, strlen(buf), 1, stderr);
+ fflush(stderr);
+ }
}
}
print_wmsg(char arg, int dumpme, const char *dev, int level,
const char *mtpt, time_t ddate)
{
- char *date;
+ char *date = NULL;
if (ddate) {
char *d;