=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/machine.c,v retrieving revision 1.107 retrieving revision 1.108 diff -c -r1.107 -r1.108 *** src/usr.bin/top/machine.c 2020/07/06 16:27:59 1.107 --- src/usr.bin/top/machine.c 2020/08/23 21:11:55 1.108 *************** *** 1,4 **** ! /* $OpenBSD: machine.c,v 1.107 2020/07/06 16:27:59 kn Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert --- 1,4 ---- ! /* $OpenBSD: machine.c,v 1.108 2020/08/23 21:11:55 kn Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert *************** *** 414,420 **** int (*compare) (const void *, const void *)) { int show_idle, show_system, show_threads, show_uid, show_pid, show_cmd; ! int hide_uid; int total_procs, active_procs; struct kinfo_proc **prefp, *pp; int what = KERN_PROC_ALL; --- 414,420 ---- int (*compare) (const void *, const void *)) { int show_idle, show_system, show_threads, show_uid, show_pid, show_cmd; ! int show_rtable, hide_rtable, hide_uid; int total_procs, active_procs; struct kinfo_proc **prefp, *pp; int what = KERN_PROC_ALL; *************** *** 446,451 **** --- 446,453 ---- show_uid = sel->uid != (uid_t)-1; hide_uid = sel->huid != (uid_t)-1; show_pid = sel->pid != (pid_t)-1; + show_rtable = sel->rtableid != -1; + hide_rtable = sel->hrtableid != -1; show_cmd = sel->command != NULL; /* count up process states and get pointers to interesting procs */ *************** *** 474,479 **** --- 476,483 ---- (!hide_uid || pp->p_ruid != sel->huid) && (!show_uid || pp->p_ruid == sel->uid) && (!show_pid || pp->p_pid == sel->pid) && + (!hide_rtable || pp->p_rtableid != sel->hrtableid) && + (!show_rtable || pp->p_rtableid == sel->rtableid) && (!show_cmd || cmd_matches(pp, sel->command))) { *prefp++ = pp; active_procs++;