Added missing const qualifiers.
* sem_limits.c: * shm_limits.c: * swap.c: Added missing const qualifiers. * uptime.c: (glibtop_get_uptime_s): Cleaned up. Added boot_time.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
2004-05-25 Benoît Dejean <tazforever@dlfp.org>
|
||||
|
||||
* sem_limits.c:
|
||||
* shm_limits.c:
|
||||
* swap.c: Added missing const qualifiers.
|
||||
|
||||
* uptime.c: (glibtop_get_uptime_s): Cleaned up. Added boot_time.
|
||||
|
||||
2004-03-09 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* proclist.c: (glibtop_get_proclist_s): fix g_malloc usage on non-Linux
|
||||
|
@@ -41,7 +41,7 @@ union semun
|
||||
};
|
||||
#endif
|
||||
|
||||
static unsigned long _glibtop_sysdeps_sem_limits =
|
||||
static const unsigned long _glibtop_sysdeps_sem_limits =
|
||||
(1 << GLIBTOP_IPC_SEMMAP) + (1 << GLIBTOP_IPC_SEMMNI) +
|
||||
(1 << GLIBTOP_IPC_SEMMNS) + (1 << GLIBTOP_IPC_SEMMNU) +
|
||||
(1 << GLIBTOP_IPC_SEMMSL) + (1 << GLIBTOP_IPC_SEMOPM) +
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
static unsigned long _glibtop_sysdeps_shm_limits =
|
||||
static const unsigned long _glibtop_sysdeps_shm_limits =
|
||||
(1 << GLIBTOP_IPC_SHMMAX) + (1 << GLIBTOP_IPC_SHMMIN) +
|
||||
(1 << GLIBTOP_IPC_SHMMNI) + (1 << GLIBTOP_IPC_SHMSEG) +
|
||||
(1 << GLIBTOP_IPC_SHMALL);
|
||||
|
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "kernel.h"
|
||||
|
||||
static unsigned long _glibtop_sysdeps_swap =
|
||||
static const unsigned long _glibtop_sysdeps_swap =
|
||||
(1 << GLIBTOP_SWAP_TOTAL) + (1 << GLIBTOP_SWAP_USED) +
|
||||
(1 << GLIBTOP_SWAP_FREE) + (1 << GLIBTOP_SWAP_PAGEIN) +
|
||||
(1 << GLIBTOP_SWAP_PAGEOUT);
|
||||
|
@@ -25,9 +25,11 @@
|
||||
#include <glibtop/error.h>
|
||||
#include <glibtop/uptime.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "kernel.h"
|
||||
|
||||
static unsigned long _glibtop_sysdeps_uptime =
|
||||
static const unsigned long _glibtop_sysdeps_uptime =
|
||||
(1 << GLIBTOP_UPTIME_UPTIME) + (1 << GLIBTOP_UPTIME_IDLETIME);
|
||||
|
||||
/* Init function. */
|
||||
@@ -61,4 +63,5 @@ glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
|
||||
|
||||
buf->uptime = (double) tbl.uptime.uptime / HZ;
|
||||
buf->idletime = (double) tbl.uptime.idle / HZ;
|
||||
buf->boot_time = (guint64) time(NULL) - (tbl.uptime.uptime / HZ);
|
||||
}
|
||||
|
Reference in New Issue
Block a user