summaryrefslogtreecommitdiff
path: root/usr.bin/w
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/w')
-rw-r--r--usr.bin/w/extern.h6
-rw-r--r--usr.bin/w/proc_compare.c4
-rw-r--r--usr.bin/w/w.c14
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/w/extern.h b/usr.bin/w/extern.h
index c1fe4f6dfac..4c1e6507fbf 100644
--- a/usr.bin/w/extern.h
+++ b/usr.bin/w/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.7 2004/09/14 22:24:24 deraadt Exp $ */
+/* $OpenBSD: extern.h,v 1.8 2011/04/10 03:20:59 guenther Exp $ */
/*-
* Copyright (c) 1993
@@ -31,9 +31,9 @@
* @(#)extern.h 8.1 (Berkeley) 6/6/93
*/
-struct kinfo_proc2;
+struct kinfo_proc;
void fmt_puts(const char *, int *);
void fmt_putc(int, int *);
void pr_attime(time_t *, time_t *);
void pr_idle(time_t);
-int proc_compare(const struct kinfo_proc2 *, const struct kinfo_proc2 *);
+int proc_compare(const struct kinfo_proc *, const struct kinfo_proc *);
diff --git a/usr.bin/w/proc_compare.c b/usr.bin/w/proc_compare.c
index 727b881a071..a03ef9e84bb 100644
--- a/usr.bin/w/proc_compare.c
+++ b/usr.bin/w/proc_compare.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc_compare.c,v 1.11 2009/10/27 23:59:49 deraadt Exp $ */
+/* $OpenBSD: proc_compare.c,v 1.12 2011/04/10 03:20:59 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -62,7 +62,7 @@
#define BOTH 3
int
-proc_compare(const struct kinfo_proc2 *p1, const struct kinfo_proc2 *p2)
+proc_compare(const struct kinfo_proc *p1, const struct kinfo_proc *p2)
{
if (p1 == NULL)
return (1);
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index e625a640764..a9aa8321ae2 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: w.c,v 1.47 2009/10/27 23:59:49 deraadt Exp $ */
+/* $OpenBSD: w.c,v 1.48 2011/04/10 03:20:59 guenther Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993, 1994
@@ -92,10 +92,10 @@ struct entry {
struct utmp utmp;
dev_t tdev; /* dev_t of terminal */
time_t idle; /* idle time of terminal in seconds */
- struct kinfo_proc2 *kp; /* `most interesting' proc */
+ struct kinfo_proc *kp; /* `most interesting' proc */
} *ep, *ehead = NULL, **nextp = &ehead;
-static void pr_args(struct kinfo_proc2 *);
+static void pr_args(struct kinfo_proc *);
static void pr_header(time_t *, int);
static struct stat
*ttystat(char *);
@@ -105,7 +105,7 @@ int
main(int argc, char *argv[])
{
extern char *__progname;
- struct kinfo_proc2 *kp;
+ struct kinfo_proc *kp;
struct hostent *hp;
struct stat *stp;
FILE *ut;
@@ -218,7 +218,7 @@ main(int argc, char *argv[])
#define WUSED (sizeof(HEADER) - sizeof("WHAT"))
(void)puts(HEADER);
- kp = kvm_getproc2(kd, KERN_PROC_ALL, 0, sizeof(*kp), &nentries);
+ kp = kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(*kp), &nentries);
if (kp == NULL)
errx(1, "%s", kvm_geterr(kd));
for (i = 0; i < nentries; i++, kp++) {
@@ -324,7 +324,7 @@ main(int argc, char *argv[])
}
static void
-pr_args(struct kinfo_proc2 *kp)
+pr_args(struct kinfo_proc *kp)
{
char **argv, *str;
int left;
@@ -332,7 +332,7 @@ pr_args(struct kinfo_proc2 *kp)
if (kp == NULL)
goto nothing; /* XXX - can this happen? */
left = argwidth;
- argv = kvm_getargv2(kd, kp, argwidth+60); /* +60 for ftpd snip */
+ argv = kvm_getargv(kd, kp, argwidth+60); /* +60 for ftpd snip */
if (argv == NULL)
goto nothing;