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,18 @@ static struct nlist nlst [] = {
void
glibtop_init_msg_limits_p (glibtop *server)
{
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
if (kvm_nlist (server->machine.kd, nlst) != 0)
glibtop_error_io_r (server, "kvm_nlist");
if (kvm_nlist (server->machine.kd, nlst) != 0) {
glibtop_warn_io_r (server, "kvm_nlist (msg_limits)");
return;
}
if (kvm_read (server->machine.kd, nlst [0].n_value,
&_msginfo, sizeof (_msginfo)) != sizeof (_msginfo))
glibtop_error_io_r (server, "kvm_read (msginfo)");
&_msginfo, sizeof (_msginfo)) != sizeof (_msginfo)) {
glibtop_warn_io_r (server, "kvm_read (msginfo)");
return;
}
server->sysdeps.msg_limits = _glibtop_sysdeps_msg_limits;
}
/* Provides information about sysv ipc limits. */
@@ -72,6 +76,9 @@ glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
memset (buf, 0, sizeof (glibtop_msg_limits));
if (server->sysdeps.msg_limits == 0)
return;
buf->msgmax = _msginfo.msgmax;
buf->msgmni = _msginfo.msgmni;
buf->msgmnb = _msginfo.msgmnb;