#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.49 2001/06/18 10:58:28 stelian Exp $";
+ "$Id: main.c,v 1.52 2001/07/18 13:12:33 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include <sys/param.h>
#include <sys/time.h>
+#include <time.h>
#ifdef __linux__
#ifdef HAVE_EXT2FS_EXT2_FS_H
#include <ext2fs/ext2_fs.h>
#include <linux/ext2_fs.h>
#endif
#include <ext2fs/ext2fs.h>
-#include <time.h>
#include <sys/stat.h>
#include <bsdcompat.h>
#elif defined sunos
tapeprefix = "standard output";
}
- if (blocksperfile)
+ if (blocksperfile && !compressed)
blocksperfile = blocksperfile / ntrec * ntrec; /* round down */
else if (!unlimited) {
/*
strncpy(tape, tapeprefix, MAXPATHLEN);
tape[MAXPATHLEN - 1] = '\0';
+ if (!pipeout) {
+ if (STAT(tape, &statbuf) != -1)
+ fifoout= statbuf.st_mode & S_IFIFO;
+ }
+
if (!sizest) {
msg("Date of this level %c dump: %s", level,
ctime4(&spcl.c_date));
+#ifdef USE_QFA
+ gThisDumpDate = spcl.c_date;
+#endif
if (spcl.c_ddate)
msg("Date of last level %c dump: %s", lastlevel,
ctime4(&spcl.c_ddate));
tnow = trewind();
- if (pipeout)
+ if (pipeout || fifoout)
msg("%ld tape blocks (%.2fMB)\n", spcl.c_tapea,
((double)spcl.c_tapea * TP_BSIZE / 1048576));
else
case SIGHUP:
case SIGTERM:
case SIGTRAP:
- if (pipeout)
+ if (pipeout || fifoout)
quit("Signal on pipe: cannot recover\n");
msg("Rewriting attempted as response to unknown signal: %d.\n", signo);
(void)fflush(stderr);