=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/top/machine.c,v retrieving revision 1.32 retrieving revision 1.33 diff -c -r1.32 -r1.33 *** src/usr.bin/top/machine.c 2003/06/14 20:23:41 1.32 --- src/usr.bin/top/machine.c 2003/06/15 16:24:44 1.33 *************** *** 1,4 **** ! /* $OpenBSD: machine.c,v 1.32 2003/06/14 20:23:41 avsm Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert --- 1,4 ---- ! /* $OpenBSD: machine.c,v 1.33 2003/06/15 16:24:44 millert Exp $ */ /*- * Copyright (c) 1994 Thorsten Lockert *************** *** 144,150 **** /* define pagetok in terms of pageshift */ #define pagetok(size) ((size) << pageshift) ! int maxslp; int getstathz(void) --- 144,150 ---- /* define pagetok in terms of pageshift */ #define pagetok(size) ((size) << pageshift) ! unsigned int maxslp; int getstathz(void) *************** *** 311,317 **** get_process_info(struct system_info *si, struct process_select *sel, int (*compare) (const void *, const void *)) { ! int show_idle, show_system, show_uid, show_command; int total_procs, active_procs, i; struct kinfo_proc **prefp, *pp; --- 311,317 ---- get_process_info(struct system_info *si, struct process_select *sel, int (*compare) (const void *, const void *)) { ! int show_idle, show_system, show_uid; int total_procs, active_procs, i; struct kinfo_proc **prefp, *pp; *************** *** 332,338 **** /* set up flags which define what we are going to select */ show_idle = sel->idle; show_system = sel->system; ! show_uid = sel->uid != -1; /* count up process states and get pointers to interesting procs */ total_procs = 0; --- 332,338 ---- /* set up flags which define what we are going to select */ show_idle = sel->idle; show_system = sel->system; ! show_uid = sel->uid != (uid_t)-1; /* count up process states and get pointers to interesting procs */ total_procs = 0; *************** *** 353,359 **** if ((PP(pp, p_stat) != SZOMB) && (show_idle || (PP(pp, p_pctcpu) != 0) || (PP(pp, p_stat) == SRUN)) && ! (!show_uid || EP(pp, e_pcred.p_ruid) == (uid_t) sel->uid)) { *prefp++ = pp; active_procs++; } --- 353,359 ---- if ((PP(pp, p_stat) != SZOMB) && (show_idle || (PP(pp, p_pctcpu) != 0) || (PP(pp, p_stat) == SRUN)) && ! (!show_uid || EP(pp, e_pcred.p_ruid) == sel->uid)) { *prefp++ = pp; active_procs++; } *************** *** 610,616 **** * security problem. It validates requests for the "kill" * and "renice" commands. */ ! int proc_owner(pid_t pid) { struct kinfo_proc **prefp, *pp; --- 610,616 ---- * security problem. It validates requests for the "kill" * and "renice" commands. */ ! uid_t proc_owner(pid_t pid) { struct kinfo_proc **prefp, *pp;