Glibify a bit more. Closes #147618.
* doc/reference.texi: * include/glibtop/command.h: * include/glibtop/glib-arrays.h: * include/glibtop/proclist.h: * lib/glib-arrays.c: (glibtop_get_proclist_as_array_l): * lib/lib.pl: * scripts/c_types.pl: * src/daemon/main.c: (handle_parent_connection): * src/daemon/slave.c: (handle_slave_connection): * support/mkstemp.c: * sysdeps/aix/proclist.c: (glibtop_get_proclist_s): * sysdeps/freebsd/cpu.c: (glibtop_get_cpu_p): * sysdeps/freebsd/prockernel.c: (glibtop_get_proc_kernel_p): * sysdeps/freebsd/proclist.c: (glibtop_get_proclist_p): * sysdeps/freebsd/procmem.c: (glibtop_get_proc_mem_p): * sysdeps/kernel/proclist.c: (glibtop_get_proclist_s): * sysdeps/linux/proclist.c: (glibtop_get_proclist_s): * sysdeps/osf1/proclist.c: (glibtop_get_proclist_p): * sysdeps/solaris/proclist.c: (glibtop_get_proclist_s): * sysdeps/stub/proclist.c: (glibtop_get_proclist_s): * sysdeps/stub_suid/proclist.c: (glibtop_get_proclist_p): * sysdeps/sun4/proclist.c: (glibtop_get_proclist_p): Glibify a bit more. Closes #147618.
This commit is contained in:
26
ChangeLog
26
ChangeLog
@@ -1,3 +1,29 @@
|
||||
2004-07-18 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* doc/reference.texi:
|
||||
* include/glibtop/command.h:
|
||||
* include/glibtop/glib-arrays.h:
|
||||
* include/glibtop/proclist.h:
|
||||
* lib/glib-arrays.c: (glibtop_get_proclist_as_array_l):
|
||||
* lib/lib.pl:
|
||||
* scripts/c_types.pl:
|
||||
* src/daemon/main.c: (handle_parent_connection):
|
||||
* src/daemon/slave.c: (handle_slave_connection):
|
||||
* support/mkstemp.c:
|
||||
* sysdeps/aix/proclist.c: (glibtop_get_proclist_s):
|
||||
* sysdeps/freebsd/cpu.c: (glibtop_get_cpu_p):
|
||||
* sysdeps/freebsd/prockernel.c: (glibtop_get_proc_kernel_p):
|
||||
* sysdeps/freebsd/proclist.c: (glibtop_get_proclist_p):
|
||||
* sysdeps/freebsd/procmem.c: (glibtop_get_proc_mem_p):
|
||||
* sysdeps/kernel/proclist.c: (glibtop_get_proclist_s):
|
||||
* sysdeps/linux/proclist.c: (glibtop_get_proclist_s):
|
||||
* sysdeps/osf1/proclist.c: (glibtop_get_proclist_p):
|
||||
* sysdeps/solaris/proclist.c: (glibtop_get_proclist_s):
|
||||
* sysdeps/stub/proclist.c: (glibtop_get_proclist_s):
|
||||
* sysdeps/stub_suid/proclist.c: (glibtop_get_proclist_p):
|
||||
* sysdeps/sun4/proclist.c: (glibtop_get_proclist_p): Glibify a bit more.
|
||||
Closes #147618.
|
||||
|
||||
2004-07-17 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* include/glibtop/fsusage.h: Added read, write. This members provides
|
||||
|
@@ -359,11 +359,11 @@ Library function @code{glibtop_get_proclist}:
|
||||
@cartouche
|
||||
unsigned *
|
||||
glibtop_get_proclist (glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg);
|
||||
gint64 which, gint64 arg);
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg);
|
||||
gint64 which, gint64 arg);
|
||||
@end cartouche
|
||||
@end example
|
||||
|
||||
|
@@ -82,7 +82,7 @@ union _glibtop_response_union
|
||||
|
||||
struct _glibtop_response
|
||||
{
|
||||
int64_t offset;
|
||||
gint64 offset;
|
||||
guint64 size, data_size;
|
||||
glibtop_response_union u;
|
||||
};
|
||||
|
@@ -38,7 +38,7 @@ GPtrArray *
|
||||
glibtop_get_proc_args_as_array_l (glibtop_client *client, pid_t pid);
|
||||
|
||||
GArray *
|
||||
glibtop_get_proclist_as_array_l (glibtop_client *client, int64_t which, int64_t arg);
|
||||
glibtop_get_proclist_as_array_l (glibtop_client *client, gint64 which, gint64 arg);
|
||||
|
||||
GPtrArray *
|
||||
glibtop_get_proc_map_as_array_l (glibtop_client *client, pid_t pid);
|
||||
|
@@ -72,20 +72,20 @@ struct _glibtop_proclist
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg);
|
||||
gint64 which, gint64 arg);
|
||||
|
||||
#if GLIBTOP_SUID_PROCLIST
|
||||
void glibtop_init_proclist_p (glibtop *server);
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg);
|
||||
gint64 which, gint64 arg);
|
||||
#else
|
||||
void glibtop_init_proclist_s (glibtop *server);
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg);
|
||||
gint64 which, gint64 arg);
|
||||
#endif
|
||||
|
||||
#ifdef GLIBTOP_NAMES
|
||||
|
@@ -29,8 +29,8 @@
|
||||
#include <glibtop/glib-arrays.h>
|
||||
|
||||
GArray *
|
||||
glibtop_get_proclist_as_array_l (glibtop_client *client, int64_t which,
|
||||
int64_t arg)
|
||||
glibtop_get_proclist_as_array_l (glibtop_client *client, gint64 which,
|
||||
gint64 arg)
|
||||
{
|
||||
glibtop_array array;
|
||||
GArray *retval;
|
||||
|
@@ -67,7 +67,7 @@ print '';
|
||||
print '/* Library functions. */';
|
||||
print '';
|
||||
|
||||
$convert{'long'} = 'int64_t';
|
||||
$convert{'long'} = 'gint64';
|
||||
$convert{'ulong'} = 'guint64';
|
||||
$convert{'pid_t'} = 'pid_t';
|
||||
$convert{'int'} = 'int';
|
||||
|
@@ -49,7 +49,7 @@ my $c_demarshal_func = sub {
|
||||
# * Flag specifying whether we need to copy the parameter into temp storage
|
||||
#
|
||||
|
||||
$typeinfo = {'long' => ['int64_t', 0],
|
||||
$typeinfo = {'long' => ['gint64', 0],
|
||||
'ulong' => ['guint64', 0],
|
||||
'pid_t' => ['pid_t', 0],
|
||||
'int' => ['int', 0],
|
||||
|
@@ -41,7 +41,7 @@ handle_parent_connection (int s)
|
||||
glibtop_mountentry *mount_list;
|
||||
char parameter [BUFSIZ];
|
||||
unsigned short device;
|
||||
int64_t *param_ptr;
|
||||
gint64 *param_ptr;
|
||||
int all_fs;
|
||||
pid_t pid;
|
||||
void *ptr;
|
||||
@@ -133,7 +133,7 @@ handle_parent_connection (int s)
|
||||
do_output (s, resp, _offset_data (sem_limits), 0, NULL);
|
||||
break;
|
||||
case GLIBTOP_CMND_PROCLIST:
|
||||
param_ptr = (int64_t *) parameter;
|
||||
param_ptr = (gint64 *) parameter;
|
||||
ptr = glibtop_get_proclist_l (server,
|
||||
&resp->u.data.proclist,
|
||||
param_ptr [0],
|
||||
|
@@ -27,7 +27,7 @@ void
|
||||
handle_slave_connection (int input, int output)
|
||||
{
|
||||
glibtop *server G_GNUC_UNUSED = glibtop_global_server;
|
||||
int64_t *param_ptr G_GNUC_UNUSED;
|
||||
gint64 *param_ptr G_GNUC_UNUSED;
|
||||
const void *ptr G_GNUC_UNUSED;
|
||||
|
||||
unsigned short max_len G_GNUC_UNUSED;
|
||||
@@ -72,7 +72,7 @@ handle_slave_connection (int input, int output)
|
||||
return;
|
||||
#if GLIBTOP_SUID_PROCLIST
|
||||
case GLIBTOP_CMND_PROCLIST:
|
||||
param_ptr = (int64_t *) parameter;
|
||||
param_ptr = (gint64 *) parameter;
|
||||
ptr = glibtop_get_proclist_p
|
||||
(server, &resp->u.data.proclist,
|
||||
param_ptr [0], param_ptr [1]);
|
||||
|
@@ -50,7 +50,7 @@ glibtop_init_proclist_s (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
struct procsinfo pinfo;
|
||||
int count, total;
|
||||
|
@@ -77,7 +77,7 @@ void
|
||||
glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
|
||||
{
|
||||
#ifdef KERN_CP_TIME
|
||||
u_int64_t cpts [CPUSTATES];
|
||||
guint64 cpts [CPUSTATES];
|
||||
#else
|
||||
long cpts [CPUSTATES];
|
||||
#endif
|
||||
|
@@ -225,27 +225,27 @@ glibtop_get_proc_kernel_p (glibtop *server,
|
||||
#else
|
||||
#if defined(__NetBSD__)
|
||||
#if defined(__m68k__)
|
||||
buf->kstk_esp = (u_int64_t) pcb.pcb_usp;
|
||||
buf->kstk_eip = (u_int64_t) 0;
|
||||
buf->kstk_esp = (guint64) pcb.pcb_usp;
|
||||
buf->kstk_eip = (guint64) 0;
|
||||
#elif defined(__x86_64__)
|
||||
buf->kstk_esp = (u_int64_t) pcb.pcb_usersp;
|
||||
buf->kstk_eip = (u_int64_t) 0;
|
||||
buf->kstk_esp = (guint64) pcb.pcb_usersp;
|
||||
buf->kstk_eip = (guint64) 0;
|
||||
#elif (defined(__arm32__) || defined(__powerpc__))
|
||||
buf->kstk_esp = (u_int64_t) pcb.pcb_sp;
|
||||
buf->kstk_eip = (u_int64_t) 0;
|
||||
buf->kstk_esp = (guint64) pcb.pcb_sp;
|
||||
buf->kstk_eip = (guint64) 0;
|
||||
#elif defined(__mipsel__)
|
||||
buf->kstk_esp = (u_int64_t) pcb.pcb_context[8];
|
||||
buf->kstk_eip = (u_int64_t) 0;
|
||||
buf->kstk_esp = (guint64) pcb.pcb_context[8];
|
||||
buf->kstk_eip = (guint64) 0;
|
||||
#elif defined(__sparc__)
|
||||
buf->kstk_esp = (u_int64_t) pcb.pcb_sp;
|
||||
buf->kstk_eip = (u_int64_t) pcb.pcb_pc;
|
||||
buf->kstk_esp = (guint64) pcb.pcb_sp;
|
||||
buf->kstk_eip = (guint64) pcb.pcb_pc;
|
||||
#elif defined(__alpha__)
|
||||
buf->kstk_esp = (u_int64_t) pcb.pcb_context[9];
|
||||
buf->kstk_eip = (u_int64_t) pcb.pcb_context[8];
|
||||
buf->kstk_esp = (guint64) pcb.pcb_context[9];
|
||||
buf->kstk_eip = (guint64) pcb.pcb_context[8];
|
||||
#else
|
||||
/* provide some defaults for other platforms */
|
||||
buf->kstk_esp = (u_int64_t) 0;
|
||||
buf->kstk_eip = (u_int64_t) 0;
|
||||
buf->kstk_esp = (guint64) 0;
|
||||
buf->kstk_eip = (guint64) 0;
|
||||
#endif /* ${MACHINE_ARCH} */
|
||||
#endif /* __NetBSD__ */
|
||||
buf->flags |= _glibtop_sysdeps_proc_kernel_pcb;
|
||||
|
@@ -59,7 +59,7 @@ glibtop_init_proclist_p (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t real_which, int64_t arg)
|
||||
gint64 real_which, gint64 arg)
|
||||
{
|
||||
struct kinfo_proc *pinfo;
|
||||
unsigned *pids = NULL;
|
||||
|
@@ -150,10 +150,10 @@ glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
|
||||
|
||||
buf->rss_rlim = pinfo [0].ki_rssize;
|
||||
|
||||
buf->vsize = buf->size = (u_int64_t) pagetok
|
||||
buf->vsize = buf->size = (guint64) pagetok
|
||||
(pinfo [0].ki_tsize + pinfo [0].ki_dsize + pinfo[0].ki_ssize)
|
||||
<< LOG1024;
|
||||
buf->resident = buf->rss = (u_int64_t) pagetok
|
||||
buf->resident = buf->rss = (guint64) pagetok
|
||||
(pinfo [0].ki_rssize) << LOG1024;
|
||||
|
||||
#else
|
||||
|
@@ -56,7 +56,7 @@ glibtop_init_proclist_s (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
union table tbl;
|
||||
unsigned *pids_chain;
|
||||
|
@@ -62,7 +62,7 @@ glibtop_init_proclist_s (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
DIR *proc;
|
||||
struct dirent *entry;
|
||||
|
@@ -66,7 +66,7 @@ glibtop_init_proclist_p (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
unsigned count = 0, total = 0;
|
||||
unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
|
||||
|
@@ -55,7 +55,7 @@ glibtop_init_proclist_s (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
DIR *proc;
|
||||
struct dirent *entry;
|
||||
|
@@ -45,7 +45,7 @@ glibtop_init_proclist_s (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
memset (buf, 0, sizeof (glibtop_proclist));
|
||||
return NULL;
|
||||
|
@@ -39,7 +39,7 @@ glibtop_init_proclist_p (glibtop *server)
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
glibtop_init_p (server, GLIBTOP_SYSDEPS_PROCLIST, 0);
|
||||
|
||||
|
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
|
||||
|
||||
unsigned *
|
||||
glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf,
|
||||
int64_t which, int64_t arg)
|
||||
gint64 which, gint64 arg)
|
||||
{
|
||||
register struct proc *pp;
|
||||
register int i, nproc = 0;
|
||||
|
Reference in New Issue
Block a user