NetBSD Problem Report #54469
From www@netbsd.org Thu Aug 15 19:48:41 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id B1EE57A10E
for <gnats-bugs@gnats.NetBSD.org>; Thu, 15 Aug 2019 19:48:41 +0000 (UTC)
Message-Id: <20190815194840.6579B7A1E1@mollari.NetBSD.org>
Date: Thu, 15 Aug 2019 19:48:40 +0000 (UTC)
From: perseant@hhhh.org
Reply-To: perseant@hhhh.org
To: gnats-bugs@NetBSD.org
Subject: Add -D flag to dump(8)
X-Send-Pr-Version: www-1.0
>Number: 54469
>Category: bin
>Synopsis: Add -D flag to dump(8)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Aug 15 19:50:00 +0000 2019
>Closed-Date: Mon Aug 19 18:13:57 +0000 2019
>Last-Modified: Mon Aug 19 18:15:01 +0000 2019
>Originator: Konrad Schroder
>Release: Through 20190815 current
>Organization:
University of Washington
>Environment:
NetBSD apu1c.bastion.coral.washington.edu 9.99.7 NetBSD 9.99.7 (APU1C_GENERIC) #13: Thu Aug 15 12:14:59 PDT 2019 root@backup.coral.washington.edu:/ovar/src-current/sys/arch/amd64/compile/obj/APU1C_GENERIC amd64
>Description:
In (at least) FreeBSD and Linux, dump(8) has a flag -D which allows the user to specify a dumpdates file other than /etc/dumpdates. This could be useful for user-mounted media if the user does not have permission to write to /etc/dumpdates; or for keeping multiple independent backup sets.
The patch is straightforward. If there are no objections I'll commit it in a few days.
>How-To-Repeat:
# dump -D mydumpdatesfile -0 -f- /
dump: unknown option -- D
usage: dump [-0123456789aceFinStuX] [-B records] [-b blocksize]
[-d density] [-f file] [-h level] [-k read-blocksize]
[-L label] [-l timeout] [-r cachesize] [-s feet]
[-T date] [-x snap-backup] files-to-dump
dump [-W | -w]
>Fix:
Index: sbin/dump/dump.8
===================================================================
RCS file: /cvsroot/src/sbin/dump/dump.8,v
retrieving revision 1.71
diff -u -r1.71 dump.8
--- sbin/dump/dump.8 25 Mar 2019 07:03:17 -0000 1.71
+++ sbin/dump/dump.8 15 Aug 2019 19:44:46 -0000
@@ -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 .
Index: sbin/dump/main.c
===================================================================
RCS file: /cvsroot/src/sbin/dump/main.c,v
retrieving revision 1.75
diff -u -r1.75 main.c
--- sbin/dump/main.c 25 Mar 2019 02:13:01 -0000 1.75
+++ sbin/dump/main.c 15 Aug 2019 19:44:46 -0000
@@ -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;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: perseant@NetBSD.org
State-Changed-When: Mon, 19 Aug 2019 18:13:57 +0000
State-Changed-Why:
Applied patch
From: "Konrad Schroder" <perseant@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54469 CVS commit: src/sbin/dump
Date: Mon, 19 Aug 2019 18:12:51 +0000
Module Name: src
Committed By: perseant
Date: Mon Aug 19 18:12:50 UTC 2019
Modified Files:
src/sbin/dump: dump.8 main.c
Log Message:
Add -D flag to allow the user to specify an alternate dumpdates file.
Closes PR #54469.
To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/sbin/dump/dump.8
cvs rdiff -u -r1.75 -r1.76 src/sbin/dump/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.