From 79e318657e7faa7b2951ff554dc6f1b92624a477 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Sat, 19 Aug 2000 23:48:10 +0000 Subject: [PATCH] Only level 0 and no -u when dumping a subdirectory --- CHANGES | 7 ++++++- dump/dump.8.in | 27 ++++++++++++--------------- dump/main.c | 14 +++++++++++++- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/CHANGES b/CHANGES index 7fd7c00..c04282a 100644 --- 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 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 + for reporting the bug. + Changes between versions 0.4b17 and 0.4b18 (released June 30, 2000) =================================================================== diff --git a/dump/dump.8.in b/dump/dump.8.in index 18056b6..54f8251 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.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 @@ -51,20 +51,7 @@ .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 diff --git a/dump/main.c b/dump/main.c index 0890d40..c2e4eaf 100644 --- a/dump/main.c +++ b/dump/main.c @@ -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 @@ -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); -- 2.39.5