summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsthen <sthen@openbsd.org>2009-07-21 17:07:38 +0000
committersthen <sthen@openbsd.org>2009-07-21 17:07:38 +0000
commit71d7cfdeb6f7468fae0b776dec81fc4da093cd0e (patch)
tree0df385b315bd78855f168796fa6f901b92f75ef9
parentsync (diff)
downloadwireguard-openbsd-71d7cfdeb6f7468fae0b776dec81fc4da093cd0e.tar.xz
wireguard-openbsd-71d7cfdeb6f7468fae0b776dec81fc4da093cd0e.zip
Allow systat(1) to resolve names by adding a new -N flag. (The default was
changed some time ago). Noticed by landry@, discussed with canacar@ and others. ok deraadt@
-rw-r--r--usr.bin/systat/main.c10
-rw-r--r--usr.bin/systat/systat.110
2 files changed, 15 insertions, 5 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index b83ac6d8a2b..d4c04728508 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.54 2009/06/25 20:45:43 deraadt Exp $ */
+/* $Id: main.c,v 1.55 2009/07/21 17:07:38 sthen Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar
* Copyright (c) 2001 Daniel Hartmeier
@@ -197,7 +197,7 @@ void
usage(void)
{
extern char *__progname;
- fprintf(stderr, "usage: %s [-abin] [-d count] "
+ fprintf(stderr, "usage: %s [-abiNn] [-d count] "
"[-s delay] [-w width] [view] [delay]\n", __progname);
exit(1);
}
@@ -388,7 +388,7 @@ main(int argc, char *argv[])
if (setresgid(gid, gid, gid) == -1)
err(1, "setresgid");
- while ((ch = getopt(argc, argv, "abd:ins:w:")) != -1) {
+ while ((ch = getopt(argc, argv, "Nabd:ins:w:")) != -1) {
switch (ch) {
case 'a':
maxlines = -1;
@@ -405,7 +405,11 @@ main(int argc, char *argv[])
case 'i':
interactive = 1;
break;
+ case 'N':
+ nflag = 0;
+ break;
case 'n':
+ /* this is a noop, -n is the default */
nflag = 1;
break;
case 's':
diff --git a/usr.bin/systat/systat.1 b/usr.bin/systat/systat.1
index 024d0e5ab1c..c283ab1e315 100644
--- a/usr.bin/systat/systat.1
+++ b/usr.bin/systat/systat.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: systat.1,v 1.80 2009/06/23 18:52:16 jmc Exp $
+.\" $OpenBSD: systat.1,v 1.81 2009/07/21 17:07:38 sthen Exp $
.\" $NetBSD: systat.1,v 1.6 1996/05/10 23:16:39 thorpej Exp $
.\"
.\" Copyright (c) 1985, 1990, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)systat.1 8.2 (Berkeley) 12/30/93
.\"
-.Dd $Mdocdate: June 23 2009 $
+.Dd $Mdocdate: July 21 2009 $
.Dt SYSTAT 1
.Os
.Sh NAME
@@ -96,8 +96,14 @@ Exit after
screen updates.
.It Fl i
Interactive mode.
+.It Fl N
+Resolve network addresses to names.
+This is the opposite of the
+.Fl n
+option.
.It Fl n
Do not try to reverse map IP addresses.
+This is the default.
.It Fl s Ar delay
Specifies the screen refresh time interval in seconds.
This option is overridden by the final