diff options
-rw-r--r-- | sysdeps/linux/ChangeLog | 9 | ||||
-rw-r--r-- | sysdeps/linux/cpu.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/loadavg.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/mem.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/msg_limits.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/netlist.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/ppp.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procargs.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/prockernel.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/proclist.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procmap.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procmem.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procopenfiles.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procsegment.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procsignal.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procstate.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/proctime.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procuid.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/procwd.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/sem_limits.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/shm_limits.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/swap.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/sysinfo.c | 2 | ||||
-rw-r--r-- | sysdeps/linux/uptime.c | 2 |
24 files changed, 9 insertions, 46 deletions
diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index bc6eaad9..e4401e4a 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,12 @@ +2007-05-20 Benoît Dejean <benoit@placenet.org> + + * *.c: + + Got rid of glibtop_init_s calls. + If i'm right, these are only no-op and the legacy stub/ don't + have any calls to them, so it's should harmless. + So let's try it. + 2007-05-19 Benoît Dejean <benoit@placenet.org> * proclist.c: (glibtop_get_proclist_s): diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c index 16c2ca9c..5ef07315 100644 --- a/sysdeps/linux/cpu.c +++ b/sysdeps/linux/cpu.c @@ -73,8 +73,6 @@ glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) char buffer [BUFSIZ], *p; int i; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); - memset (buf, 0, sizeof (glibtop_cpu)); file_to_buffer(server, buffer, FILENAME); diff --git a/sysdeps/linux/loadavg.c b/sysdeps/linux/loadavg.c index 0e0a827b..1c1e15da 100644 --- a/sysdeps/linux/loadavg.c +++ b/sysdeps/linux/loadavg.c @@ -50,8 +50,6 @@ glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf) { char buffer [BUFSIZ], *p, *old; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_LOADAVG, 0); - memset (buf, 0, sizeof (glibtop_loadavg)); file_to_buffer(server, buffer, FILENAME); diff --git a/sysdeps/linux/mem.c b/sysdeps/linux/mem.c index b8fa63f9..d9964a4c 100644 --- a/sysdeps/linux/mem.c +++ b/sysdeps/linux/mem.c @@ -48,8 +48,6 @@ glibtop_get_mem_s (glibtop *server, glibtop_mem *buf) { char buffer [BUFSIZ]; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0); - memset(buf, 0, sizeof *buf); file_to_buffer(server, buffer, FILENAME); diff --git a/sysdeps/linux/msg_limits.c b/sysdeps/linux/msg_limits.c index e579ae6a..69c3ad41 100644 --- a/sysdeps/linux/msg_limits.c +++ b/sysdeps/linux/msg_limits.c @@ -46,8 +46,6 @@ glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf) { struct msginfo msginfo; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0); - memset (buf, 0, sizeof (glibtop_msg_limits)); msgctl (0, IPC_INFO, (void*) &msginfo); diff --git a/sysdeps/linux/netlist.c b/sysdeps/linux/netlist.c index 9563ae45..0e579c26 100644 --- a/sysdeps/linux/netlist.c +++ b/sysdeps/linux/netlist.c @@ -44,8 +44,6 @@ glibtop_get_netlist_s (glibtop *server, glibtop_netlist *buf) FILE *f; GPtrArray *devices; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_NETLIST, 0); - memset (buf, 0, sizeof (glibtop_netlist)); f = fopen("/proc/net/dev", "r"); diff --git a/sysdeps/linux/ppp.c b/sysdeps/linux/ppp.c index a3ad267d..a4db1d82 100644 --- a/sysdeps/linux/ppp.c +++ b/sysdeps/linux/ppp.c @@ -180,8 +180,6 @@ glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device) { int in, out, online; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PPP, 0); - memset (buf, 0, sizeof (glibtop_ppp)); if (is_ISDN_on (server, &online)) { diff --git a/sysdeps/linux/procargs.c b/sysdeps/linux/procargs.c index d0db1860..228728a4 100644 --- a/sysdeps/linux/procargs.c +++ b/sysdeps/linux/procargs.c @@ -47,8 +47,6 @@ glibtop_get_proc_args_s (glibtop *server, glibtop_proc_args *buf, gsize length; GError *error = NULL; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_ARGS, 0); - memset (buf, 0, sizeof (glibtop_proc_args)); sprintf (filename, "/proc/%d/cmdline", pid); diff --git a/sysdeps/linux/prockernel.c b/sysdeps/linux/prockernel.c index 536037cd..a682b72b 100644 --- a/sysdeps/linux/prockernel.c +++ b/sysdeps/linux/prockernel.c @@ -47,8 +47,6 @@ glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid) { char buffer [BUFSIZ], *p; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0); - memset (buf, 0, sizeof (glibtop_proc_kernel)); if (proc_stat_to_buffer (buffer, pid)) diff --git a/sysdeps/linux/proclist.c b/sysdeps/linux/proclist.c index 753c2d7e..423865bd 100644 --- a/sysdeps/linux/proclist.c +++ b/sysdeps/linux/proclist.c @@ -66,8 +66,6 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, glibtop_proc_state procstate; struct stat statb; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROCLIST, 0); - memset (buf, 0, sizeof (glibtop_proclist)); proc = opendir ("/proc"); diff --git a/sysdeps/linux/procmap.c b/sysdeps/linux/procmap.c index 05d1e7b0..e66146d5 100644 --- a/sysdeps/linux/procmap.c +++ b/sysdeps/linux/procmap.c @@ -133,8 +133,6 @@ glibtop_get_proc_map_s (glibtop *server, glibtop_proc_map *buf, pid_t pid) char *line = NULL; size_t line_size = 0; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_MAP, 0); - memset (buf, 0, sizeof (glibtop_proc_map)); has_smaps = server->os_version_code >= LINUX_VERSION_CODE(2, 6, 14); diff --git a/sysdeps/linux/procmem.c b/sysdeps/linux/procmem.c index 875a39ef..f81e26d5 100644 --- a/sysdeps/linux/procmem.c +++ b/sysdeps/linux/procmem.c @@ -52,8 +52,6 @@ glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid) char buffer [BUFSIZ], *p; const size_t pagesize = get_page_size(); - glibtop_init_s (&server, GLIBTOP_SYSDEPS_MEM, 0); - memset (buf, 0, sizeof (glibtop_proc_mem)); if (proc_stat_to_buffer (buffer, pid)) diff --git a/sysdeps/linux/procopenfiles.c b/sysdeps/linux/procopenfiles.c index 58295ca2..6aa37c4c 100644 --- a/sysdeps/linux/procopenfiles.c +++ b/sysdeps/linux/procopenfiles.c @@ -182,8 +182,6 @@ glibtop_get_proc_open_files_s (glibtop *server, glibtop_proc_open_files *buf, pi struct dirent *direntry; DIR *dir; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_OPEN_FILES, 0); - memset (buf, 0, sizeof (glibtop_proc_open_files)); sprintf (fn, "/proc/%d/fd", pid); diff --git a/sysdeps/linux/procsegment.c b/sysdeps/linux/procsegment.c index 822ec7c5..3c1abaf3 100644 --- a/sysdeps/linux/procsegment.c +++ b/sysdeps/linux/procsegment.c @@ -55,8 +55,6 @@ glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf, char buffer [BUFSIZ], *p; const size_t pagesize = get_page_size(); - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0); - memset (buf, 0, sizeof (glibtop_proc_segment)); if (proc_stat_to_buffer (buffer, pid)) diff --git a/sysdeps/linux/procsignal.c b/sysdeps/linux/procsignal.c index 5a0a63d7..ed355d0f 100644 --- a/sysdeps/linux/procsignal.c +++ b/sysdeps/linux/procsignal.c @@ -45,8 +45,6 @@ glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid) { char buffer [BUFSIZ], *p; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0); - memset (buf, 0, sizeof (glibtop_proc_signal)); if (proc_stat_to_buffer (buffer, pid)) diff --git a/sysdeps/linux/procstate.c b/sysdeps/linux/procstate.c index 13ba070c..1bb99afc 100644 --- a/sysdeps/linux/procstate.c +++ b/sysdeps/linux/procstate.c @@ -51,8 +51,6 @@ glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid) char buffer [BUFSIZ], *p; struct stat statb; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0); - memset (buf, 0, sizeof (glibtop_proc_state)); /* IMPORTANT NOTICE: For security reasons it is extremely important diff --git a/sysdeps/linux/proctime.c b/sysdeps/linux/proctime.c index 07b2a855..1c630466 100644 --- a/sysdeps/linux/proctime.c +++ b/sysdeps/linux/proctime.c @@ -56,8 +56,6 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid) char buffer [BUFSIZ], *p; int i; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0); - memset (buf, 0, sizeof (glibtop_proc_time)); if (proc_stat_to_buffer (buffer, pid)) diff --git a/sysdeps/linux/procuid.c b/sysdeps/linux/procuid.c index 5d11002b..b0d6e49e 100644 --- a/sysdeps/linux/procuid.c +++ b/sysdeps/linux/procuid.c @@ -53,8 +53,6 @@ glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid) { char buffer [BUFSIZ], *p; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_UID, 0); - memset (buf, 0, sizeof (glibtop_proc_uid)); if (proc_status_to_buffer (buffer, pid)) diff --git a/sysdeps/linux/procwd.c b/sysdeps/linux/procwd.c index 71990015..9a79085f 100644 --- a/sysdeps/linux/procwd.c +++ b/sysdeps/linux/procwd.c @@ -59,8 +59,6 @@ glibtop_get_proc_wd_s(glibtop *server, glibtop_proc_wd *buf, pid_t pid) char dir[256]; DIR *task; - glibtop_init_s(&server, GLIBTOP_SYSDEPS_PROC_WD, 0); - memset(buf, 0, sizeof(glibtop_proc_wd)); g_snprintf(path, sizeof path, "/proc/%u/root", pid); diff --git a/sysdeps/linux/sem_limits.c b/sysdeps/linux/sem_limits.c index 3c4a6a6b..01ed8213 100644 --- a/sysdeps/linux/sem_limits.c +++ b/sysdeps/linux/sem_limits.c @@ -63,8 +63,6 @@ glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf) struct seminfo seminfo; union semun arg; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0); - memset (buf, 0, sizeof (glibtop_sem_limits)); buf->flags = _glibtop_sysdeps_sem_limits; diff --git a/sysdeps/linux/shm_limits.c b/sysdeps/linux/shm_limits.c index 2d392852..8e86eb1d 100644 --- a/sysdeps/linux/shm_limits.c +++ b/sysdeps/linux/shm_limits.c @@ -45,8 +45,6 @@ glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf) { struct shminfo shminfo; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0); - memset (buf, 0, sizeof (glibtop_shm_limits)); shmctl (0, IPC_INFO, (void *) &shminfo); diff --git a/sysdeps/linux/swap.c b/sysdeps/linux/swap.c index 11881b86..65d8763c 100644 --- a/sysdeps/linux/swap.c +++ b/sysdeps/linux/swap.c @@ -54,8 +54,6 @@ glibtop_get_swap_s (glibtop *server, glibtop_swap *buf) { char buffer [BUFSIZ], *p; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_SWAP, 0); - memset (buf, 0, sizeof (glibtop_swap)); file_to_buffer(server, buffer, MEMINFO); diff --git a/sysdeps/linux/sysinfo.c b/sysdeps/linux/sysinfo.c index 8b77daa2..3e4f9695 100644 --- a/sysdeps/linux/sysinfo.c +++ b/sysdeps/linux/sysinfo.c @@ -41,8 +41,6 @@ init_sysinfo (glibtop *server) if(G_LIKELY(sysinfo.flags)) return; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); - file_to_buffer(server, buffer, FILENAME); /* cpuinfo records are seperated by a blank line */ diff --git a/sysdeps/linux/uptime.c b/sysdeps/linux/uptime.c index 5a39ca70..997947d8 100644 --- a/sysdeps/linux/uptime.c +++ b/sysdeps/linux/uptime.c @@ -49,8 +49,6 @@ glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf) { char buffer [BUFSIZ], *p; - glibtop_init_s (&server, GLIBTOP_SYSDEPS_UPTIME, 0); - memset (buf, 0, sizeof (glibtop_uptime)); file_to_buffer(server, buffer, FILENAME); |