Use glibtop_warn_io_r () instead of glibtop_error_io_r ().
1998-10-31 Martin Baulig <martin@home-of-linux.org> * *.c: Use glibtop_warn_io_r () instead of glibtop_error_io_r (). * proctime.c, prockernel.c, procargs.c: Don't call kvm_uread () if the /proc filesystem is not mounted.
This commit is contained in:
committed by
Martin Baulig
parent
0fec2b7fb0
commit
82fdca61c2
@@ -53,14 +53,12 @@ glibtop_get_proc_state_p (glibtop *server,
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||
|
||||
glibtop_suid_enter (server);
|
||||
|
||||
/* Get the process information */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
|
||||
if ((pinfo == NULL) || (count != 1))
|
||||
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
|
||||
glibtop_suid_leave (server);
|
||||
if ((pinfo == NULL) || (count != 1)) {
|
||||
glibtop_warn_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
return;
|
||||
}
|
||||
|
||||
strncpy (buf->cmd, pinfo [0].kp_proc.p_comm, sizeof (buf->cmd)-1);
|
||||
buf->cmd [sizeof (buf->cmd)-1] = 0;
|
||||
|
||||
Reference in New Issue
Block a user