#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.15 2000/12/21 11:14:54 stelian Exp $";
+ "$Id: main.c,v 1.19 2001/03/23 14:40:12 stelian Exp $";
#endif /* not lint */
#include <config.h>
#include <errno.h>
#ifdef __linux__
+#ifdef HAVE_EXT2FS_EXT2_FS_H
+#include <ext2fs/ext2_fs.h>
+#else
#include <linux/ext2_fs.h>
+#endif
#include <bsdcompat.h>
#include <signal.h>
#include <string.h>
#include "extern.h"
int bflag = 0, cvtflag = 0, dflag = 0, vflag = 0, yflag = 0;
-int hflag = 1, mflag = 1, Nflag = 0;
+int hflag = 1, mflag = 1, Nflag = 0, zflag = 0;
int uflag = 0;
int dokerberos = 0;
char command = '\0';
long ntrec;
char *dumpmap;
char *usedinomap;
-ino_t maxino;
+dump_ino_t maxino;
time_t dumptime;
time_t dumpdate;
FILE *terminal;
main(int argc, char *argv[])
{
int ch;
- ino_t ino;
+ dump_ino_t ino;
char *inputdev = _PATH_DEFTAPE;
char *symtbl = "./restoresymtable";
char *p, name[MAXPATHLEN];
static void
usage(void)
{
+#ifdef __linux__
+ const char *ext2ver, *ext2date;
+
+ ext2fs_get_library_version(&ext2ver, &ext2date);
+ (void)fprintf(stderr, "%s %s (using libext2fs %s of %s)\n",
+ __progname, _DUMP_VERSION, ext2ver, ext2date);
+#else
+ (void)fprintf(stderr, "%s %s\n", __progname, _DUMP_VERSION);
+#endif
+
#ifdef KERBEROS
#define kerbflag "k"
#else
#define kerbflag
#endif
- (void)fprintf(stderr,
- "%s %s\n", __progname, _DUMP_VERSION);
(void)fprintf(stderr,
- "usage:\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n",
+ "usage:\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n\t%s%s\n",
+ __progname, " -C [-c" kerbflag "Mvy] [-b blocksize] [-D filesystem] [-f file] [-s fileno]",
__progname, " -i [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-s fileno]",
- __progname, " -r [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno]",
- __progname, " -R [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno]",
- __progname, " -x [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-s fileno] [-X filelist] [file ...]",
- __progname, " -t [-ch" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-X filelist] [file ...]");
+ __progname, " -r [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-T directory]",
+ __progname, " -R [-c" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-T directory]",
+ __progname, " -t [-ch" kerbflag "Muvy] [-b blocksize] [-f file] [-s fileno] [-X filelist] [file ...]",
+ __progname, " -x [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-s fileno] [-X filelist] [file ...]");
exit(1);
}