New file. Added definition of `proc_map'.
1998-08-10 Martin Baulig <martin@home-of-linux.org> * include/glibtop/procmap.h (glibtop_proc_map): New file. * features.def: Added definition of `proc_map'.
This commit is contained in:
committed by
Martin Baulig
parent
b6885555c1
commit
d9361d388c
@@ -141,6 +141,15 @@ handle_parent_connection (int s)
|
||||
resp->u.data.proclist.total, ptr);
|
||||
glibtop_free_r (server, ptr);
|
||||
break;
|
||||
case GLIBTOP_CMND_PROC_MAP:
|
||||
memcpy (&pid, parameter, sizeof (pid_t));
|
||||
ptr = glibtop_get_proc_map_l (server,
|
||||
&resp->u.data.proc_map,
|
||||
pid);
|
||||
do_output (s, resp, _offset_data (proc_map),
|
||||
resp->u.data.proc_map.total, ptr);
|
||||
glibtop_free_r (server, ptr);
|
||||
break;
|
||||
case GLIBTOP_CMND_PROC_STATE:
|
||||
memcpy (&pid, parameter, sizeof (pid_t));
|
||||
glibtop_get_proc_state_l
|
||||
|
||||
@@ -44,7 +44,8 @@ GLIBTOP_SUID_PROC_MEM +
|
||||
GLIBTOP_SUID_PROC_TIME +
|
||||
GLIBTOP_SUID_PROC_SIGNAL +
|
||||
GLIBTOP_SUID_PROC_KERNEL +
|
||||
GLIBTOP_SUID_PROC_SEGMENT;
|
||||
GLIBTOP_SUID_PROC_SEGMENT +
|
||||
GLIBTOP_SUID_PROC_MEM;
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
|
||||
@@ -30,6 +30,7 @@ handle_slave_connection (int input, int output)
|
||||
char parameter [BUFSIZ];
|
||||
int64_t *param_ptr;
|
||||
void *ptr;
|
||||
pid_t pid;
|
||||
|
||||
glibtop_send_version (glibtop_global_server, output);
|
||||
|
||||
@@ -74,6 +75,17 @@ handle_slave_connection (int input, int output)
|
||||
resp->u.data.proclist.total, ptr);
|
||||
glibtop_free_r (server, ptr);
|
||||
break;
|
||||
#endif
|
||||
#if GLIBTOP_SUID_PROC_MAP
|
||||
case GLIBTOP_CMND_PROC_MAP:
|
||||
memcpy (&pid, parameter, sizeof (pid_t));
|
||||
ptr = glibtop_get_proc_map_p (server,
|
||||
&resp->u.data.proc_map,
|
||||
pid);
|
||||
do_output (output, resp, _offset_data (proc_map),
|
||||
resp->u.data.proc_map.total, ptr);
|
||||
glibtop_free_r (server, ptr);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
handle_slave_command (cmnd, resp, parameter);
|
||||
|
||||
Reference in New Issue
Block a user