Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/dump Add -D flag to allow the user to specify an altern...



details:   https://anonhg.NetBSD.org/src/rev/b2ad3fa34078
branches:  trunk
changeset: 463360:b2ad3fa34078
user:      perseant <perseant%NetBSD.org@localhost>
date:      Mon Aug 19 18:12:50 2019 +0000

description:
Add -D flag to allow the user to specify an alternate dumpdates file.
Closes PR #54469.

diffstat:

 sbin/dump/dump.8 |   6 +++++-
 sbin/dump/main.c |  10 +++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (65 lines):

diff -r 83888ff11503 -r b2ad3fa34078 sbin/dump/dump.8
--- a/sbin/dump/dump.8  Mon Aug 19 14:09:12 2019 +0000
+++ b/sbin/dump/dump.8  Mon Aug 19 18:12:50 2019 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: dump.8,v 1.71 2019/03/25 07:03:17 wiz Exp $
+.\"    $NetBSD: dump.8,v 1.72 2019/08/19 18:12:50 perseant Exp $
 .\"
 .\" Copyright (c) 1980, 1991, 1993
 .\"     Regents of the University of California.
@@ -42,6 +42,7 @@
 .Op Fl 0123456789aceFinStuX
 .Op Fl B Ar records
 .Op Fl b Ar blocksize
+.Op Fl D Ar dumpdates-file
 .Op Fl d Ar density
 .Op Fl f Ar file
 .Op Fl h Ar level
@@ -145,6 +146,9 @@
 .It Fl c
 Modify the calculation of the default density and tape size to be more
 appropriate for cartridge tapes.
+.It Fl D Ar dumpdates-file
+Use the given file as a record of dump dates instead of
+.Pa /etc/dumpdates .
 .It Fl d Ar density
 Set tape density to
 .Ar density .
diff -r 83888ff11503 -r b2ad3fa34078 sbin/dump/main.c
--- a/sbin/dump/main.c  Mon Aug 19 14:09:12 2019 +0000
+++ b/sbin/dump/main.c  Mon Aug 19 18:12:50 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.75 2019/03/25 02:13:01 manu Exp $   */
+/*     $NetBSD: main.c,v 1.76 2019/08/19 18:12:50 perseant Exp $       */
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.75 2019/03/25 02:13:01 manu Exp $");
+__RCSID("$NetBSD: main.c,v 1.76 2019/08/19 18:12:50 perseant Exp $");
 #endif
 #endif /* not lint */
 
@@ -133,7 +133,7 @@
 
        obsolete(&argc, &argv);
        while ((ch = getopt(argc, argv,
-           "0123456789aB:b:cd:eFf:h:ik:l:L:nr:s:StT:uU:Wwx:X")) != -1)
+           "0123456789aB:b:cd:D:eFf:h:ik:l:L:nr:s:StT:uU:Wwx:X")) != -1)
                switch (ch) {
                /* dump level */
                case '0': case '1': case '2': case '3': case '4':
@@ -164,6 +164,10 @@
                                ntrec = HIGHDENSITYTREC;
                        break;
 
+               case 'D':               /* specify alt. dumpdates file */
+                       dumpdates = optarg;
+                       break;
+
                case 'e':               /* eject full tapes */
                        eflag = 1;
                        break;



Home | Main Index | Thread Index | Old Index