**** Merged from HEAD ****
2000-02-13 Martin Baulig <martin@home-of-linux.org> * *.c: kvm_nlist () returns -1 on error, but a positive return value does not necessarily mean failure. Fixes #3302 which was reported by Matthias Scheler some time ago.
This commit is contained in:
committed by
Martin Baulig
parent
7752a312e9
commit
1e568f294e
@@ -1,3 +1,9 @@
|
||||
2000-02-13 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
* *.c: kvm_nlist () returns -1 on error, but a positive return value
|
||||
does not necessarily mean failure. Fixes #3302 which was reported by
|
||||
Matthias Scheler some time ago.
|
||||
|
||||
1999-10-16 Martin Baulig <martin@home-of-linux.org>
|
||||
|
||||
Applied all patches from the FreeBSD 3.3 ports collection.
|
||||
|
@@ -51,7 +51,7 @@ static int mib [] = { CTL_KERN, KERN_CLOCKRATE };
|
||||
void
|
||||
glibtop_init_cpu_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (cpu)");
|
||||
return;
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ glibtop_init_mem_p (glibtop *server)
|
||||
{
|
||||
register int pagesize;
|
||||
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (mem)");
|
||||
return;
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ static struct nlist nlst [] = {
|
||||
void
|
||||
glibtop_init_msg_limits_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (msg_limits)");
|
||||
return;
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ glibtop_init_netload_p (glibtop *server)
|
||||
{
|
||||
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
||||
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0)
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0)
|
||||
glibtop_error_io_r (server, "kvm_nlist");
|
||||
}
|
||||
|
||||
|
@@ -82,7 +82,7 @@ glibtop_init_ppp_p (glibtop *server)
|
||||
#endif
|
||||
#endif /* HAVE_I4B */
|
||||
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0)
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0)
|
||||
glibtop_error_io_r (server, "kvm_nlist");
|
||||
}
|
||||
|
||||
|
@@ -78,7 +78,7 @@ static struct nlist nlst [] = {
|
||||
void
|
||||
glibtop_init_sem_limits_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (sem_limits)");
|
||||
return;
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ static struct nlist nlst [] = {
|
||||
void
|
||||
glibtop_init_shm_limits_p (glibtop *server)
|
||||
{
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (shm_limits)");
|
||||
return;
|
||||
}
|
||||
|
@@ -97,7 +97,7 @@ glibtop_init_swap_p (glibtop *server)
|
||||
{
|
||||
#if defined(__FreeBSD__) || defined(__bsdi__)
|
||||
#if __FreeBSD__ < 4 || defined(__bsdi__)
|
||||
if (kvm_nlist (server->machine.kd, nlst) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (swap)");
|
||||
return;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ glibtop_init_swap_p (glibtop *server)
|
||||
#endif
|
||||
|
||||
#if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000))
|
||||
if (kvm_nlist (server->machine.kd, nlst2) != 0) {
|
||||
if (kvm_nlist (server->machine.kd, nlst2) < 0) {
|
||||
glibtop_warn_io_r (server, "kvm_nlist (cnt)");
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user