Reflect latest interface changes; return 0 on success and -1 on error.

This commit is contained in:
Martin Baulig
1999-11-21 16:54:36 +00:00
parent cdc8e43a79
commit 81176f8181
20 changed files with 158 additions and 53 deletions

View File

@@ -37,6 +37,8 @@ int
glibtop_init_proc_kernel_s (glibtop *server)
{
server->sysdeps.proc_kernel = _glibtop_sysdeps_proc_kernel;
return 0;
}
/* Provides detailed information about a process. */
@@ -51,10 +53,10 @@ glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid)
memset (buf, 0, sizeof (glibtop_proc_kernel));
if (proc_stat_to_buffer (buffer, pid))
return;
return -1;
p = proc_stat_after_cmd (buffer);
if (!p) return;
if (!p) return -1;
p = skip_multiple_token (p, 6);
@@ -74,4 +76,6 @@ glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid)
buf->nwchan = strtoul (p, &p, 0);
buf->flags = _glibtop_sysdeps_proc_kernel;
return 0;
}