Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat Make :drives, :display, :ignore accept fnmatc...
details: https://anonhg.NetBSD.org/src/rev/73d034879521
branches: trunk
changeset: 790646:73d034879521
user: bad <bad%NetBSD.org@localhost>
date: Fri Oct 18 22:42:31 2013 +0000
description:
Make :drives, :display, :ignore accept fnmatch(3) patterns to specify drives.
Bump man page date.
diffstat:
usr.bin/systat/disks.c | 8 ++++----
usr.bin/systat/systat.1 | 7 +++++--
2 files changed, 9 insertions(+), 6 deletions(-)
diffs (62 lines):
diff -r ad39de6e0a41 -r 73d034879521 usr.bin/systat/disks.c
--- a/usr.bin/systat/disks.c Fri Oct 18 22:18:14 2013 +0000
+++ b/usr.bin/systat/disks.c Fri Oct 18 22:42:31 2013 +0000
@@ -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 @@
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);
diff -r ad39de6e0a41 -r 73d034879521 usr.bin/systat/systat.1
--- a/usr.bin/systat/systat.1 Fri Oct 18 22:18:14 2013 +0000
+++ b/usr.bin/systat/systat.1 Fri Oct 18 22:42:31 2013 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index