#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.59 2001/08/16 15:24:21 stelian Exp $";
+ "$Id: main.c,v 1.62 2001/11/11 00:12:48 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include <sys/time.h>
#include <time.h>
#ifdef __linux__
+#include <linux/fs.h>
#ifdef HAVE_EXT2FS_EXT2_FS_H
#include <ext2fs/ext2_fs.h>
#else
int uflag; /* update flag */
int Mflag; /* multi-volume flag */
int qflag; /* quit on errors flag */
+int breademax = 32; /* maximum number of bread errors before we quit */
char *eot_script; /* end of volume script fiag */
int diskfd; /* disk file descriptor */
int tapefd; /* tape file descriptor */
#endif /* USE_QFA */
while ((ch = getopt(argc, argv,
- "0123456789aB:b:cd:e:E:f:F:h:"
+ "0123456789aB:b:cd:e:E:f:F:h:I:"
#ifdef HAVE_BZLIB
"j::"
#endif
break;
#endif /* HAVE_BZLIB */
+ case 'I':
+ breademax =
+ numarg ("number of errors to ignore", 1L, 0L);
+ break;
+
#ifdef KERBEROS
case 'k':
dokerberos = 1;
} /* end of size estimate */
#ifdef __linux__
+ if ((diskfd = OPEN(disk, O_RDONLY)) < 0) {
+ msg("Cannot open %s\n", disk);
+ msg("The ENTIRE dump is aborted.\n");
+ exit(X_STARTUP);
+ }
+#ifdef BLKFLSBUF
+ (void)ioctl(diskfd, BLKFLSBUF);
+#endif
retval = dump_fs_open(disk, &fs);
if (retval) {
com_err(disk, retval, "while opening filesystem");
msg("The ENTIRE dump is aborted.\n");
exit(X_STARTUP);
}
- if ((diskfd = OPEN(disk, O_RDONLY)) < 0) {
- msg("Cannot open %s\n", disk);
- msg("The ENTIRE dump is aborted.\n");
- exit(X_STARTUP);
- }
/* if no user label specified, use ext2 filesystem label if available */
if (spcl.c_label[0] == '\0') {
const char *lbl;
#endif
"MnqSu"
"] [-B records] [-b blocksize] [-d density]\n"
- "\t%s [-e inode#,inode#,...] [-E file] [-f file] [-h level] "
+ "\t%s [-e inode#,inode#,...] [-E file] [-f file] [-h level]\n"
+ "\t%s [-I nr errors] "
#ifdef HAVE_BZLIB
"[-j zlevel] "
#endif
- "\n\t%s "
#ifdef USE_QFA
"[-Q file] "
#endif