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,18 @@ static struct nlist nlst [] = {
|
||||
void
|
||||
glibtop_init_shm_limits_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_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 (shm_limits)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (kvm_read (server->machine.kd, nlst [0].n_value,
|
||||
&_shminfo, sizeof (_shminfo)) != sizeof (_shminfo))
|
||||
glibtop_error_io_r (server, "kvm_read (shminfo)");
|
||||
&_shminfo, sizeof (_shminfo)) != sizeof (_shminfo)) {
|
||||
glibtop_warn_io_r (server, "kvm_read (shminfo)");
|
||||
return;
|
||||
}
|
||||
|
||||
server->sysdeps.shm_limits = _glibtop_sysdeps_shm_limits;
|
||||
}
|
||||
|
||||
/* Provides information about sysv ipc limits. */
|
||||
@@ -72,6 +76,9 @@ glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_shm_limits));
|
||||
|
||||
if (server->sysdeps.shm_limits == 0)
|
||||
return;
|
||||
|
||||
buf->shmmax = _shminfo.shmmax;
|
||||
buf->shmmin = _shminfo.shmmin;
|
||||
buf->shmmni = _shminfo.shmmni;
|
||||
|
Reference in New Issue
Block a user