]> git.wh0rd.org - dump.git/commitdiff
Only level 0 and no -u when dumping a subdirectory
authorStelian Pop <stelian@popies.net>
Sat, 19 Aug 2000 23:48:10 +0000 (23:48 +0000)
committerStelian Pop <stelian@popies.net>
Sat, 19 Aug 2000 23:48:10 +0000 (23:48 +0000)
CHANGES
dump/dump.8.in
dump/main.c

diff --git a/CHANGES b/CHANGES
index 7fd7c007ca19a0a1ea1a2bfc0d683875eec41184..c04282a2b7107467f28e5ef2353daa19d9e964f8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.72 2000/08/19 23:15:38 stelian Exp $
+$Id: CHANGES,v 1.73 2000/08/19 23:48:10 stelian Exp $
 
 Changes between versions 0.4b17 and 0.4b19 (released ?????????????)
 ===================================================================
@@ -19,6 +19,11 @@ Changes between versions 0.4b17 and 0.4b19 (released ?????????????)
        Thanks to Bernhard Erdmann <bernhard.erdmann@gmx.de>
        for reporting the bug.
 
+5.     Reinforce dump in order to allow only level 0 and no
+       -u option when dumping a subdirectory, and document 
+       this in the man page. Thanks to Bernhard Erdmann 
+       <bernhard.erdmann@gmx.de> for reporting the bug.
+
 Changes between versions 0.4b17 and 0.4b18 (released June 30, 2000)
 ===================================================================
 
index 18056b6c8b9b29b8d7258bb1c6b999468efe6300..54f8251c028df83231f439a29a100db00e1051f8 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.15 2000/08/19 22:08:53 stelian Exp $
+.\"    $Id: dump.8.in,v 1.16 2000/08/19 23:48:10 stelian Exp $
 .\"
 .Dd __DATE__
 .Dt DUMP 8
 .Op Fl L Ar label
 .Op Fl s Ar feet
 .Op Fl T Ar date
-.Ar filesystem
-.Nm dump
-.Op Fl 0123456789ackMnSu
-.Op Fl B Ar records
-.Op Fl b Ar blocksize
-.Op Fl d Ar density
-.Op Fl e Ar inode number
-.Op Fl f Ar file
-.Op Fl F Ar script
-.Op Fl h Ar level
-.Op Fl L Ar label
-.Op Fl s Ar feet
-.Op Fl T Ar date
-.Ar directory
+.Ar file-to-dump
 .Nm dump
 .Op Fl W Li \&| Fl w
 .Pp
@@ -99,6 +86,16 @@ block count options below.
 By default, the same output file name is used for each volume
 after prompting the operator to change media.
 .Pp
+.Ar file-to-dump
+is either a mountpoint of a filesystem
+or a directory to be backed up as a subset of a filesystem.
+In the former case, either the path to a mounted filesystem
+or the device of an unmounted filesystem can be used.
+In the latter case, certain restrictions are placed on the backup:
+.Fl u
+is not allowed and the only dump level that is supported is
+.Fl 0 .
+.Pp
 The following options are supported by
 .Nm Ns :
 .Bl -tag -width Ds
index 0890d409105e919d5115acce22642bbbf2313351..c2e4eaf329c94e77e671c50915ec4e027313d792 100644 (file)
@@ -40,7 +40,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: main.c,v 1.22 2000/03/08 10:51:29 stelian Exp $";
+       "$Id: main.c,v 1.23 2000/08/19 23:48:10 stelian Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -410,6 +410,18 @@ main(int argc, char *argv[])
                    NAMELEN);
        }
 #endif
+
+       if (directory[0] != 0) {
+               if (level != '0') {
+                       (void)fprintf(stderr, "Only level 0 dumps are allowed on a subdirectory\n");
+                       exit(X_STARTUP);
+               }
+               if (uflag) {
+                       (void)fprintf(stderr, "You can't update the dumpdates file when dumping a subdirectory\n");
+                       exit(X_STARTUP);
+               }
+       }
+
        spcl.c_dev[NAMELEN-1]='\0';
        spcl.c_filesys[NAMELEN-1]='\0';
        (void)strncpy(spcl.c_label, labelstr, sizeof(spcl.c_label) - 1);