X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=dump%2Fmain.c;h=379e876c4bd922c248c587889434323d342aaa43;hb=008af4194627f2026f9a66f38953724c0c364c81;hp=d1e8c5f59e58547a11714d0d979771ad9f60561c;hpb=c3f69f06e7c87a8e39d2bc02396fa3ba8db76e84;p=dump.git diff --git a/dump/main.c b/dump/main.c index d1e8c5f..379e876 100644 --- a/dump/main.c +++ b/dump/main.c @@ -18,11 +18,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -41,7 +37,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.83 2003/03/26 10:58:22 stelian Exp $"; + "$Id: main.c,v 1.85 2003/03/31 09:42:58 stelian Exp $"; #endif /* not lint */ #include @@ -105,7 +101,7 @@ char *tapeprefix; /* prefix of the tape file */ char *dumpdates; /* name of the file containing dump date information*/ char lastlevel; /* dump level of previous dump */ char level; /* dump level of this dump */ -int bzipflag; /* compression is done using bzlib */ +int zipflag; /* which compression method */ int Afile = -1; /* archive file descriptor */ int AfileActive = 1;/* Afile flag */ int uflag; /* update flag */ @@ -258,6 +254,9 @@ main(int argc, char *argv[]) "Q:" #endif "s:ST:uvWw" +#ifdef HAVE_LZO + "y" +#endif #ifdef HAVE_ZLIB "z::" #endif @@ -344,7 +343,7 @@ main(int argc, char *argv[]) #ifdef HAVE_BZLIB case 'j': compressed = 2; - bzipflag = 1; + zipflag = COMPRESS_BZLIB; if (optarg) compressed = numarg("compress level", 1L, 9L); break; @@ -433,9 +432,17 @@ main(int argc, char *argv[]) case 'w': lastdump(ch); exit(X_FINOK); /* do nothing else */ +#ifdef HAVE_LZO + case 'y': + compressed = 2; + zipflag = COMPRESS_LZO; + break; +#endif /* HAVE_LZO */ + #ifdef HAVE_ZLIB case 'z': compressed = 2; + zipflag = COMPRESS_ZLIB; if (optarg) compressed = numarg("compress level", 1L, 9L); break; @@ -758,9 +765,13 @@ main(int argc, char *argv[]) msg("Writing %d Kilobyte records\n", ntrec); - if (compressed) - msg("Compressing output at compression level %d (%s)\n", - compressed, bzipflag ? "bzlib" : "zlib"); + if (compressed) { + if (zipflag == COMPRESS_LZO) + msg("Compressing output (lzo)\n"); + else + msg("Compressing output at compression level %d (%s)\n", + compressed, zipflag == COMPRESS_ZLIB ? "zlib" : "bzlib"); + } } #if defined(SIGINFO) @@ -1054,10 +1065,13 @@ usage(void) "[-j zlevel] " #endif #ifdef USE_QFA - "[-Q file] " + "[-Q file]\n" +#endif + "\t%s [-s feet] " + "[-T date] " +#ifdef HAVE_LZO + "[-y] " #endif - "[-s feet]\n" - "\t%s [-T date] " #ifdef HAVE_ZLIB "[-z zlevel] " #endif