summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-12 02:28:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-12 02:28:44 +0000
commitb18d93799f97f9255f92c7ec9e1f8e129e03360b (patch)
tree93ccfa5edb653291d01abd4010ff0de2da0e4628 /usr.bin
parentdbf76d3a599bdd84e083a43f0841940b52064af1 (diff)
invert -n into -a; default is no gethostbyaddr()
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/w/w.110
-rw-r--r--usr.bin/w/w.c10
2 files changed, 9 insertions, 11 deletions
diff --git a/usr.bin/w/w.1 b/usr.bin/w/w.1
index 160a4aef347..a96604ca987 100644
--- a/usr.bin/w/w.1
+++ b/usr.bin/w/w.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: w.1,v 1.3 1996/07/08 22:09:45 ccappuc Exp $
+.\" $OpenBSD: w.1,v 1.4 1996/08/12 02:28:43 deraadt Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -41,7 +41,7 @@
.Nd "who present users are and what they are doing"
.Sh SYNOPSIS
.Nm w
-.Op Fl hin
+.Op Fl hia
.Op Fl M Ar core
.Op Fl N Ar system
.Op Ar user
@@ -75,10 +75,8 @@ core instead of the default
Extract the name list from the specified system instead of the
default
.Dq /bsd .
-.It Fl n
-Show network addresses as numbers (normally
-.Nm w
-interprets addresses and attempts to display them symbolically).
+.It Fl a
+Attempt to translate network addresses into names.
.El
.Pp
If a
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 70bf5224dbb..ca553004915 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w.c,v 1.5 1996/08/06 20:41:32 deraadt Exp $ */
+/* $OpenBSD: w.c,v 1.6 1996/08/12 02:28:43 deraadt Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -91,7 +91,7 @@ time_t uptime; /* time of last reboot & elapsed time since */
int ttywidth; /* width of tty */
int argwidth; /* width of tty */
int header = 1; /* true if -h flag: don't print heading */
-int nflag; /* true if -n flag: don't convert addrs */
+int nflag = 1; /* true if -n flag: don't convert addrs */
int sortidle; /* sort bu idle time */
char *sel_user; /* login of particular user selected */
char domain[MAXHOSTNAMELEN];
@@ -137,7 +137,7 @@ main(argc, argv)
p = "";
} else {
wcmd = 1;
- p = "hiflM:N:nsuw";
+ p = "hiflM:N:asuw";
}
memf = nlistf = NULL;
@@ -156,8 +156,8 @@ main(argc, argv)
case 'N':
nlistf = optarg;
break;
- case 'n':
- nflag = 1;
+ case 'a':
+ nflag = 0;
break;
case 'f': case 'l': case 's': case 'u': case 'w':
warnx("[-flsuw] no longer supported");