version 1.4, 2009/08/03 17:12:07 |
version 1.5, 2009/08/09 15:17:50 |
|
|
struct stat sb; |
struct stat sb; |
size_t len; |
size_t len; |
struct kinfo_proc *buf, *newbuf; |
struct kinfo_proc *buf, *newbuf; |
struct proc *p, *bestp; |
struct proc *bestp; |
u_int i; |
u_int i; |
char *name; |
char *name; |
|
|
|
|
for (i = 0; i < len / sizeof (struct kinfo_proc); i++) { |
for (i = 0; i < len / sizeof (struct kinfo_proc); i++) { |
if (buf[i].kp_eproc.e_tdev != sb.st_rdev) |
if (buf[i].kp_eproc.e_tdev != sb.st_rdev) |
continue; |
continue; |
p = &buf[i].kp_proc; |
|
if (bestp == NULL) |
if (bestp == NULL) |
bestp = &buf[i].kp_proc; |
bestp = &buf[i].kp_proc; |
else |
else |