Module Name:    src
Committed By:   bad
Date:           Fri Oct 18 22:42:31 UTC 2013

Modified Files:
        src/usr.bin/systat: disks.c systat.1

Log Message:
Make :drives, :display, :ignore accept fnmatch(3) patterns to specify drives.
Bump man page date.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/systat/disks.c
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/systat/systat.1

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

Modified files:

Index: src/usr.bin/systat/disks.c
diff -u src/usr.bin/systat/disks.c:1.17 src/usr.bin/systat/disks.c:1.18
--- src/usr.bin/systat/disks.c:1.17	Mon Apr 13 23:20:27 2009
+++ src/usr.bin/systat/disks.c	Fri Oct 18 22:42:31 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: disks.c,v 1.17 2009/04/13 23:20:27 lukem Exp $	*/
+/*	$NetBSD: disks.c,v 1.18 2013/10/18 22:42:31 bad Exp $	*/
 
 /*-
  * Copyright (c) 1980, 1992, 1993
@@ -34,11 +34,12 @@
 #if 0
 static char sccsid[] = "@(#)disks.c	8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: disks.c,v 1.17 2009/04/13 23:20:27 lukem Exp $");
+__RCSID("$NetBSD: disks.c,v 1.18 2013/10/18 22:42:31 bad Exp $");
 #endif /* not lint */
 
 #include <ctype.h>
 #include <string.h>
+#include <fnmatch.h>
 
 #include "systat.h"
 #include "extern.h"
@@ -99,9 +100,8 @@ drvselect(char *args, int truefalse, int
 		if (cp - args == 0)
 			break;
 		for (i = 0; i < ndrive; i++)
-			if (strcmp(args, dr_name[i]) == 0) {
+			if (fnmatch(args, dr_name[i], 0) == 0) {
 				selections[i] = truefalse;
-				break;
 			}
 		if (i >= ndrive)
 			error("%s: unknown drive", args);

Index: src/usr.bin/systat/systat.1
diff -u src/usr.bin/systat/systat.1:1.42 src/usr.bin/systat/systat.1:1.43
--- src/usr.bin/systat/systat.1:1.42	Thu Mar 22 07:58:20 2012
+++ src/usr.bin/systat/systat.1	Fri Oct 18 22:42:31 2013
@@ -1,4 +1,4 @@
-.\"	$NetBSD: systat.1,v 1.42 2012/03/22 07:58:20 wiz Exp $
+.\"	$NetBSD: systat.1,v 1.43 2013/10/18 22:42:31 bad Exp $
 .\"
 .\" Copyright (c) 1985, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -29,7 +29,7 @@
 .\"
 .\"	@(#)systat.1	8.2 (Berkeley) 12/30/93
 .\"
-.Dd January 5, 2012
+.Dd October 19, 2012
 .Dt SYSTAT 1
 .Os
 .Sh NAME
@@ -500,6 +500,9 @@ information about disk drives.
 These commands are used to select a set of drives to report on,
 should your system have more drives configured than can normally
 be displayed on the screen.
+Drives may be specified as drive names or as patterns specified in the
+notation described by
+.Xr fnmatch 3 .
 .Pp
 .Bl -tag -width Ar -compact
 .It Cm display Op Ar drives

Reply via email to