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:
Martin Baulig
1998-10-30 23:06:56 +00:00
committed by Martin Baulig
parent 0fec2b7fb0
commit 82fdca61c2
16 changed files with 219 additions and 134 deletions

View File

@@ -53,14 +53,12 @@ glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
memset (buf, 0, sizeof (glibtop_proc_uid));
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;
}
buf->uid = pinfo [0].kp_eproc.e_pcred.p_ruid;
buf->euid = pinfo [0].kp_eproc.e_pcred.p_svuid;