From: Stelian Pop Date: Tue, 21 Jan 2003 10:42:24 +0000 (+0000) Subject: Let the user give the dumpdates path as an argument to dump (-D) X-Git-Tag: release_0_4b33~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c92d83ae0460e58d019fa9922a68ed87732b5583;p=dump.git Let the user give the dumpdates path as an argument to dump (-D) --- diff --git a/CHANGES b/CHANGES index 032b0a1..9bca63a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.207 2003/01/10 14:46:55 stelian Exp $ +$Id: CHANGES,v 1.208 2003/01/21 10:42:24 stelian Exp $ Changes between versions 0.4b32 and 0.4b33 (released ?????????????????) ======================================================================= @@ -39,6 +39,11 @@ Changes between versions 0.4b32 and 0.4b33 (released ?????????????????) 8. Fixed build with very old versions of libext2fs, where EXT2_FT_* constants were undefined. +9. Made dump accept the dumpdates path on the command line + (-D file option) instead of using only the hardcoded one. + Thanks to Piete Brooks for the + suggestion. + Changes between versions 0.4b31 and 0.4b32 (released November 15, 2002) ======================================================================= diff --git a/dump/dump.8.in b/dump/dump.8.in index cbb3177..b449701 100644 --- a/dump/dump.8.in +++ b/dump/dump.8.in @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Id: dump.8.in,v 1.47 2003/01/10 10:31:10 stelian Exp $ +.\" $Id: dump.8.in,v 1.48 2003/01/21 10:42:27 stelian Exp $ .\" .TH DUMP 8 "version __VERSION__ of __DATE__" BSD "System management commands" .SH NAME @@ -42,6 +42,7 @@ dump \- ext2/3 filesystem backup [\fB\-B \fIrecords\fR] [\fB\-b \fIblocksize\fR] [\fB\-d \fIdensity\fR] +[\fB\-D \fIfile\fR] [\fB\-e \fIinode numbers\fR] [\fB\-E \fIfile\fR] [\fB\-f \fIfile\fR] @@ -146,6 +147,11 @@ Set tape density to The default is 1600BPI. Specifying a tape density overrides the end-of-media detection. .TP +.BI \-D " file" +Set the path name of the file storing the information about the previous +full and incremental dumps. The default location is +.IR __DUMPDATES__ . +.TP .BI \-e " inodes" Exclude .I inodes diff --git a/dump/main.c b/dump/main.c index 5734149..45e525b 100644 --- a/dump/main.c +++ b/dump/main.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.80 2003/01/10 10:52:48 stelian Exp $"; + "$Id: main.c,v 1.81 2003/01/21 10:42:27 stelian Exp $"; #endif /* not lint */ #include @@ -244,7 +244,7 @@ main(int argc, char *argv[]) #endif /* USE_QFA */ while ((ch = getopt(argc, argv, - "0123456789A:aB:b:cd:e:E:f:F:h:I:" + "0123456789A:aB:b:cd:D:e:E:f:F:h:I:" #ifdef HAVE_BZLIB "j::" #endif @@ -313,6 +313,10 @@ main(int argc, char *argv[]) density = numarg("density", 10L, 327670L) / 10; if (density >= 625 && !bflag) ntrec = HIGHDENSITYTREC; + break; + + case 'D': /* path of dumpdates file */ + dumpdates = optarg; break; /* 04-Feb-00 ILC */ @@ -1040,8 +1044,8 @@ usage(void) #endif "mMnqSuv" "] [-A file] [-B records] [-b blocksize]\n" - "\t%s [-d density] [-e inode#,inode#,...] [-E file] [-f file]\n" - "\t%s [-h level] [-I nr errors] " + "\t%s [-d density] [-D file] [-e inode#,inode#,...] [-E file]\n" + "\t%s [-f file] [-h level] [-I nr errors] " #ifdef HAVE_BZLIB "[-j zlevel] " #endif @@ -1156,6 +1160,7 @@ obsolete(int *argcp, char **argvp[]) case 'B': case 'b': case 'd': + case 'D': case 'e': case 'E': case 'f': diff --git a/dump/optr.c b/dump/optr.c index 628c981..5f275ed 100644 --- a/dump/optr.c +++ b/dump/optr.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: optr.c,v 1.33 2002/12/12 11:49:35 stelian Exp $"; + "$Id: optr.c,v 1.34 2003/01/21 10:42:27 stelian Exp $"; #endif /* not lint */ #include @@ -637,7 +637,7 @@ lastdump(char arg) /* w ==> just what to do; W ==> most recent dumps */ initdumptimes(0); /* dumpdates input */ if (ddatev == NULL && table == NULL) { (void) printf("No %s or %s file found\n", - _PATH_MNTTAB, _PATH_DUMPDATES); + _PATH_MNTTAB, dumpdates); return; }