From: Nuno Antunes Date: Sat, 1 Mar 2008 18:49:00 +0000 (+0000) Subject: Make the -O option (show *only* kernel threads) imply the -T option (show X-Git-Tag: v2.0.1~1038 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/e225a94cdeda533821e71bba0a3ddf4544d501dd Make the -O option (show *only* kernel threads) imply the -T option (show kernel threads), as it does not make much sense otherwise. Reviewed-by: aggelos@ --- diff --git a/contrib/top/top.X b/contrib/top/top.X index 3b66f7d47b..94f893790b 100644 --- a/contrib/top/top.X +++ b/contrib/top/top.X @@ -1,7 +1,7 @@ .\" NOTE: changes to the manual page for "top" should be made in the .\" file "top.X" and NOT in the file "top.1". .\" $FreeBSD: src/contrib/top/top.X,v 1.6.6.2 2002/08/11 17:09:25 dwmalone Exp $ -.\" $DragonFly: src/contrib/top/top.X,v 1.4 2007/03/23 14:51:31 swildner Exp $ +.\" $DragonFly: src/contrib/top/top.X,v 1.5 2008/03/01 18:49:00 nant Exp $ .nr N %topn% .nr D %delay% .TH TOP 1 Local @@ -72,6 +72,9 @@ visible. .TP .B \-O Show only kernel threads. +This option implies the +.BR \-T +option. .TP .B \-b Use \*(lqbatch\*(rq mode. In this mode, all input from the terminal is diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 4d0a949bb7..cfad65cdfd 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -21,7 +21,7 @@ * Hiten Pandya * * $FreeBSD: src/usr.bin/top/machine.c,v 1.29.2.2 2001/07/31 20:27:05 tmm Exp $ - * $DragonFly: src/usr.bin/top/machine.c,v 1.24 2007/04/30 22:48:26 hasso Exp $ + * $DragonFly: src/usr.bin/top/machine.c,v 1.25 2008/03/01 18:49:00 nant Exp $ */ @@ -477,7 +477,7 @@ caddr_t get_process_info(struct system_info *si, struct process_select *sel, show_idle = sel->idle; show_self = sel->self; show_system = sel->system; - show_threads = sel->threads; + show_threads = sel->threads || sel->only_threads; show_only_threads = sel->only_threads; show_uid = sel->uid != -1; show_command = sel->command != NULL; diff --git a/usr.bin/top/top.local.1 b/usr.bin/top/top.local.1 index 98d0bc32d3..c2c5d59260 100644 --- a/usr.bin/top/top.local.1 +++ b/usr.bin/top/top.local.1 @@ -1,5 +1,5 @@ -.\" $DragonFly: src/usr.bin/top/top.local.1,v 1.2 2005/08/01 01:49:18 swildner Exp $ -.SH "FreeBSD NOTES" +.\" $DragonFly: src/usr.bin/top/top.local.1,v 1.3 2008/03/01 18:49:00 nant Exp $ +.SH "DragonFly NOTES" .SH DESCRIPTION OF MEMORY Mem: 9220K Active, 1032K Inact, 3284K Wired, 1MB Cache, 2M Buf, 1320K Free