Module Name:    src
Committed By:   martin
Date:           Wed Apr 11 14:45:51 UTC 2018

Modified Files:
        src/sbin/dkctl [netbsd-8]: dkctl.8 dkctl.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #737):

        sbin/dkctl/dkctl.8: revision 1.27
        sbin/dkctl/dkctl.8: revision 1.28
        sbin/dkctl/dkctl.c: revision 1.26

PR bin/52905

Document, and properly implement, the -q and -e options to dkctl xxN listwedges.
(implementation fix supplied by Petar Bogdanovic.)

Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.8.1 src/sbin/dkctl/dkctl.8
cvs rdiff -u -r1.25 -r1.25.4.1 src/sbin/dkctl/dkctl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/dkctl/dkctl.8
diff -u src/sbin/dkctl/dkctl.8:1.26 src/sbin/dkctl/dkctl.8:1.26.8.1
--- src/sbin/dkctl/dkctl.8:1.26	Wed Jan  6 23:01:11 2016
+++ src/sbin/dkctl/dkctl.8	Wed Apr 11 14:45:51 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: dkctl.8,v 1.26 2016/01/06 23:01:11 wiz Exp $
+.\"	$NetBSD: dkctl.8,v 1.26.8.1 2018/04/11 14:45:51 martin Exp $
 .\"
 .\" Copyright 2002 Wasabi Systems, Inc.
 .\" All rights reserved.
@@ -33,7 +33,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 6, 2016
+.Dd January 7, 2018
 .Dt DKCTL 8
 .Os
 .Sh NAME
@@ -139,8 +139,16 @@ the disk device.
 is specified, drop if
 .Ar no
 is specified.)
-.It Ic listwedges
+.It Ic listwedges Oo Fl e Oc Op Fl q
 List all of the wedges configured on the specified disk.
+With
+.Fl e
+exit with a non-zero exit status if there are no wedges
+configured on that disk.
+With
+.Fl q
+(quiet mode)
+there is no output related to the wedges that do, or do not, exist.
 .It Ic makewedges
 Delete all wedges configured on the specified disk, and autodiscover
 the wedges again.

Index: src/sbin/dkctl/dkctl.c
diff -u src/sbin/dkctl/dkctl.c:1.25 src/sbin/dkctl/dkctl.c:1.25.4.1
--- src/sbin/dkctl/dkctl.c:1.25	Wed Apr  5 20:27:09 2017
+++ src/sbin/dkctl/dkctl.c	Wed Apr 11 14:45:51 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: dkctl.c,v 1.25 2017/04/05 20:27:09 jdolecek Exp $	*/
+/*	$NetBSD: dkctl.c,v 1.25.4.1 2018/04/11 14:45:51 martin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -41,7 +41,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: dkctl.c,v 1.25 2017/04/05 20:27:09 jdolecek Exp $");
+__RCSID("$NetBSD: dkctl.c,v 1.25.4.1 2018/04/11 14:45:51 martin Exp $");
 #endif
 
 #include <sys/param.h>
@@ -684,6 +684,9 @@ disk_listwedges(int argc, char *argv[])
 		return;
 	}
 
+	if (quiet)
+		return;
+
 	qsort(dkw, dkwl.dkwl_nwedges, sizeof(*dkw), dkw_sort);
 
 	printf("%s: %u wedge%s:\n", dvname, dkwl.dkwl_nwedges,

Reply via email to