summaryrefslogtreecommitdiffstats
path: root/usr.bin/w
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2013-01-19 00:21:55 +0000
committerjhb <jhb@FreeBSD.org>2013-01-19 00:21:55 +0000
commitaf6f5a9a49588b666aad0f55b12889c28fd6ac6d (patch)
tree3807ba187cd6f0b81b951681a312f8ec5d5649bc /usr.bin/w
parent15e6f8c6a40013a2e0c15ff46849ef88e1529fcf (diff)
downloadFreeBSD-src-af6f5a9a49588b666aad0f55b12889c28fd6ac6d.zip
FreeBSD-src-af6f5a9a49588b666aad0f55b12889c28fd6ac6d.tar.gz
- Move 'showthreads' check out of fmt.c.
- Update shadow copy of fmt_argv() prototype in w.c and fix calls for additional parameter.
Diffstat (limited to 'usr.bin/w')
-rw-r--r--usr.bin/w/w.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c
index 5a84e86..1b9af5f 100644
--- a/usr.bin/w/w.c
+++ b/usr.bin/w/w.c
@@ -96,7 +96,6 @@ static int nflag; /* true if -n flag: don't convert addrs */
static int dflag; /* true if -d flag: output debug info */
static int sortidle; /* sort by idle time */
int use_ampm; /* use AM/PM time */
-int showthreads = 0;/* will threads be shown? */
static int use_comma; /* use comma as floats separator */
static char **sel_users; /* login array of particular users selected */
@@ -124,7 +123,7 @@ static struct stat *ttystat(char *);
static void usage(int);
static int this_is_uptime(const char *s);
-char *fmt_argv(char **, char *, int); /* ../../bin/ps/fmt.c */
+char *fmt_argv(char **, char *, char *, size_t); /* ../../bin/ps/fmt.c */
int
main(int argc, char *argv[])
@@ -321,7 +320,7 @@ main(int argc, char *argv[])
continue;
}
ep->args = fmt_argv(kvm_getargv(kd, ep->kp, argwidth),
- ep->kp->ki_comm, MAXCOMLEN);
+ ep->kp->ki_comm, NULL, MAXCOMLEN);
if (ep->args == NULL)
err(1, NULL);
}
@@ -405,7 +404,7 @@ main(int argc, char *argv[])
const char *ptr;
ptr = fmt_argv(kvm_getargv(kd, dkp, argwidth),
- dkp->ki_comm, MAXCOMLEN);
+ dkp->ki_comm, NULL, MAXCOMLEN);
if (ptr == NULL)
ptr = "-";
(void)printf("\t\t%-9d %s\n",
OpenPOWER on IntegriCloud