]> git.wh0rd.org - dump.git/commitdiff
Let the user give the dumpdates path as an argument to dump (-D)
authorStelian Pop <stelian@popies.net>
Tue, 21 Jan 2003 10:42:24 +0000 (10:42 +0000)
committerStelian Pop <stelian@popies.net>
Tue, 21 Jan 2003 10:42:24 +0000 (10:42 +0000)
CHANGES
dump/dump.8.in
dump/main.c
dump/optr.c

diff --git a/CHANGES b/CHANGES
index 032b0a185d7ada4b00cfd28718c2bb4dc8a694d2..9bca63a57827a4ad14f4950e4397b091dbb2f586 100644 (file)
--- 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 <pb22@users.sourceforge.net> for the
+       suggestion.
+
 Changes between versions 0.4b31 and 0.4b32 (released November 15, 2002)
 =======================================================================
 
index cbb3177a9d46d5e0dcb375e882eb64811b3735fa..b44970148d47214832d8053fbcc36314f49704bb 100644 (file)
@@ -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
index 573414989c94d395353f7254ae017cb9151b805b..45e525bbd165632c3de8f9d34fcd363b0504df0c 100644 (file)
@@ -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 <config.h>
@@ -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':
index 628c9817ea2c1484350b2dd7c6b2f406841ad32d..5f275ed5b75487ac68454f7ce4ef3e54db9d0338 100644 (file)
@@ -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 <config.h>
@@ -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;
        }