*** KSTAT/2.4/src/ps.c Mon Feb 11 19:38:54 2002 --- KSTAT/2.4/src/ps.c Wed May 15 18:51:00 2002 *************** *** 14,20 **** #include "linux.h" - #define PIDLIMIT 10000 #define cap_Raised(c, flag) (cap_t(c) & CAP_TO_MASK(flag) & CAP_BOUND) struct our_task { --- 14,19 ---- *************** *** 94,100 **** for(i=1; i < NR_TASKS; i++){ if(kread(kd, (unsigned long)addr, &taskk, sizeof(struct task_struct)) == -1) err("kread error"); - if(taskk.comm[0] != '\0') ; else continue; if(kread(kd,(unsigned long)taskk.comm, &name, 15) == -1) err("kread error"); name[16]='\0'; if(kread(kd,(unsigned long)taskk.p_pptr,&ptaskk,sizeof(struct task_struct))==-1) err("kread error"); --- 93,98 ---- *************** *** 221,227 **** printf("\n"); exit(0); } ! if(taskk.pid>0 && (strcmp(name, ""))){ ps[i].pid=taskk.pid; ps[i].ppid=ptaskk.pid; ps[i].uid=taskk.uid; --- 219,225 ---- printf("\n"); exit(0); } ! if(taskk.pid>0){ ps[i].pid=taskk.pid; ps[i].ppid=ptaskk.pid; ps[i].uid=taskk.uid; *************** *** 235,242 **** /* lame but working sort */ if(!q){ for(i=1; i < NR_TASKS; i++) ! if(ps[i].pid && ps[i].pid > lastpid) ! if(strcmp(ps[i].name, "")){ printf(" %d\t %d\t %d\t %d\t %s\n", ps[i].pid, ps[i].ppid, ps[i].uid, ps[i].gid, ps[i].name); lastpid = ps[i].pid; --- 233,239 ---- /* lame but working sort */ if(!q){ for(i=1; i < NR_TASKS; i++) ! if(ps[i].pid && ps[i].pid > lastpid) { printf(" %d\t %d\t %d\t %d\t %s\n", ps[i].pid, ps[i].ppid, ps[i].uid, ps[i].gid, ps[i].name); lastpid = ps[i].pid;