This is now a LibGTop backend which can be loaded additionally to the
2000-01-23 Martin Baulig <martin@home-of-linux.org> This is now a LibGTop backend which can be loaded additionally to the normal Linux sysdeps code. * open.c, close.c: Removed. * shm_limits.c, msg_limits.c, sem_limits.c, ppp.c: Removed. * siglist.c, sysinfo.c: Removed. * backend-kernel.c: New file. * glibtop-backend-private.h: New file. * libgtop-kernel.backend: New file. * backend-kernel.pl: New file. Automatically creates `backend-kernel.h'. * marshal.pl: New file. Automatically creates `marshal.c'. * glibtop_server.h: Replaced all `GLIBTOP_SUID_<feature>' constants with `GLIBTOP_IMPL_<feature>' ones; they're used in marshal.c to find out which features this backend implements. * *.c: Renamed all `glibtop_get_<feature>_s' functions to `glibtop_get_<feature>_k' and all `glibtop_init_<feature>_s' ones to `glibtop_init_<feature>_k'.
This commit is contained in:
committed by
Martin Baulig
parent
d2f4502e74
commit
3455d025a2
@@ -46,7 +46,7 @@ static const unsigned long _glibtop_sysdeps_map_entry_vmfile =
|
||||
/* Init function. */
|
||||
|
||||
int
|
||||
glibtop_init_proc_map_s (glibtop *server)
|
||||
glibtop_init_proc_map_k (glibtop *server)
|
||||
{
|
||||
server->sysdeps.proc_map = _glibtop_sysdeps_proc_map;
|
||||
|
||||
@@ -56,7 +56,7 @@ glibtop_init_proc_map_s (glibtop *server)
|
||||
/* Provides detailed information about a process. */
|
||||
|
||||
glibtop_map_entry *
|
||||
glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
|
||||
glibtop_get_proc_map_k (glibtop *server, glibtop_proc_map *buf, pid_t pid)
|
||||
{
|
||||
glibtop_map_entry *retval = NULL;
|
||||
libgtop_proc_maps_t *maps;
|
||||
@@ -68,13 +68,13 @@ glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid)
|
||||
memset (buf, 0, sizeof (glibtop_proc_map));
|
||||
|
||||
/* Get number of map entries. */
|
||||
count = glibtop_get_proc_data_proc_maps_s (server, pid, NULL, 0);
|
||||
count = glibtop_get_proc_data_proc_maps_k (server, pid, NULL, 0);
|
||||
|
||||
/* Allocate memory. */
|
||||
maps = glibtop_calloc_r (server, count, sizeof (libgtop_proc_maps_t));
|
||||
max_len = count * sizeof (libgtop_proc_maps_t);
|
||||
|
||||
ret = glibtop_get_proc_data_proc_maps_s (server, pid, maps, max_len);
|
||||
ret = glibtop_get_proc_data_proc_maps_k (server, pid, maps, max_len);
|
||||
if (ret < 0) {
|
||||
glibtop_free_r (server, maps);
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user