]> git.wh0rd.org - dump.git/blobdiff - restore/main.c
Another set of cleanups from Andreas Dilger (time_t cleanups, libext2 version etc).
[dump.git] / restore / main.c
index 344ec5cacf0567ea5561991e30dbc4473e033a9d..703266cd6bf05f48e7c2ef74496b5c3a9db60267 100644 (file)
@@ -2,7 +2,8 @@
  *     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@noos.fr>, 1999-2000
+ *     Stelian Pop <pop@noos.fr> - AlcĂ´ve <www.alcove.fr>, 2000
  */
 
 /*
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.12 2000/05/28 16:52:21 stelian Exp $";
+       "$Id: main.c,v 1.17 2001/03/20 09:14:58 stelian Exp $";
 #endif /* not lint */
 
+#include <config.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <errno.h>
@@ -72,7 +74,7 @@ static const char rcsid[] =
 #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';
@@ -399,13 +401,21 @@ main(int argc, char *argv[])
 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",
          __progname, " -i [-ch" kerbflag "mMuvy] [-b blocksize] [-f file] [-s fileno]",