diff options
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r-- | usr.bin/w/w.c | 14 |
1 files changed, 7 insertions, 7 deletions
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; |