bumped to 2.8.1.
* configure.in: bumped to 2.8.1. * sysdeps/common/fsusage.c: * sysdeps/common/gnuslib.c: (glibtop_make_connection), (connect_to_unix_server), (glibtop_internet_addr): * sysdeps/linux/glibtop_server.c: (get_pageshift): * sysdeps/linux/glibtop_server.h: * sysdeps/linux/open.c: (glibtop_open_s): * sysdeps/linux/ppp.c: (is_ISDN_on): Cleanups. Thanks to Kjartan Maraas. Closes #151557.
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
|||||||
|
2004-09-13 Benoît Dejean <tazforever@dlfp.org>
|
||||||
|
|
||||||
|
* configure.in: bumped to 2.8.1.
|
||||||
|
|
||||||
|
* sysdeps/common/fsusage.c:
|
||||||
|
* sysdeps/common/gnuslib.c: (glibtop_make_connection),
|
||||||
|
(connect_to_unix_server), (glibtop_internet_addr):
|
||||||
|
* sysdeps/linux/glibtop_server.c: (get_pageshift):
|
||||||
|
* sysdeps/linux/glibtop_server.h:
|
||||||
|
* sysdeps/linux/open.c: (glibtop_open_s):
|
||||||
|
* sysdeps/linux/ppp.c: (is_ISDN_on): Cleanups. Thanks to Kjartan Maraas.
|
||||||
|
Closes #151557.
|
||||||
|
|
||||||
2004-09-13 Benoît Dejean <tazforever@dlfp.org>
|
2004-09-13 Benoît Dejean <tazforever@dlfp.org>
|
||||||
|
|
||||||
* NEWS:
|
* NEWS:
|
||||||
|
@@ -8,7 +8,7 @@ AC_CANONICAL_SYSTEM
|
|||||||
|
|
||||||
LIBGTOP_MAJOR_VERSION=2
|
LIBGTOP_MAJOR_VERSION=2
|
||||||
LIBGTOP_MINOR_VERSION=8
|
LIBGTOP_MINOR_VERSION=8
|
||||||
LIBGTOP_MICRO_VERSION=0
|
LIBGTOP_MICRO_VERSION=1
|
||||||
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
LIBGTOP_VERSION=$LIBGTOP_MAJOR_VERSION.$LIBGTOP_MINOR_VERSION.$LIBGTOP_MICRO_VERSION
|
||||||
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
|
AM_INIT_AUTOMAKE(libgtop, $LIBGTOP_VERSION)
|
||||||
|
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -26,26 +26,26 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#if HAVE_LIMITS_H
|
#ifdef HAVE_LIMITS_H
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef CHAR_BIT
|
#ifndef CHAR_BIT
|
||||||
# define CHAR_BIT 8
|
# define CHAR_BIT 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_PARAM_H
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_MOUNT_H
|
#ifdef HAVE_SYS_MOUNT_H
|
||||||
# include <sys/mount.h>
|
# include <sys/mount.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_VFS_H
|
#ifdef HAVE_SYS_VFS_H
|
||||||
# include <sys/vfs.h>
|
# include <sys/vfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */
|
#ifdef HAVE_SYS_FS_S5PARAM_H /* Fujitsu UXP/V */
|
||||||
# include <sys/fs/s5param.h>
|
# include <sys/fs/s5param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -53,21 +53,21 @@
|
|||||||
# include <sys/filsys.h> /* SVR2 */
|
# include <sys/filsys.h> /* SVR2 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_FCNTL_H
|
#ifdef HAVE_FCNTL_H
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_STATFS_H
|
#ifdef HAVE_SYS_STATFS_H
|
||||||
# include <sys/statfs.h>
|
# include <sys/statfs.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_DUSTAT_H /* AIX PS/2 */
|
#ifdef HAVE_DUSTAT_H /* AIX PS/2 */
|
||||||
# include <sys/dustat.h>
|
# include <sys/dustat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SYS_STATVFS_H /* SVR4 */
|
#ifdef HAVE_SYS_STATVFS_H /* SVR4 */
|
||||||
# include <sys/statvfs.h>
|
# include <sys/statvfs.h>
|
||||||
int statvfs ();
|
int statvfs (const char *path, struct statvfs *buf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Many space usage primitives use all 1 bits to denote a value that is
|
/* Many space usage primitives use all 1 bits to denote a value that is
|
||||||
|
@@ -58,10 +58,7 @@ static int connect_to_internet_server (const char *serverhost, u_short port);
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
glibtop_make_connection (hostarg, portarg, s)
|
glibtop_make_connection (const char *hostarg, int portarg, int *s)
|
||||||
const char *hostarg;
|
|
||||||
int portarg;
|
|
||||||
int *s;
|
|
||||||
{
|
{
|
||||||
#ifdef INTERNET_DOMAIN_SOCKETS
|
#ifdef INTERNET_DOMAIN_SOCKETS
|
||||||
char *ptr;
|
char *ptr;
|
||||||
@@ -186,7 +183,7 @@ connect_to_unix_server (void)
|
|||||||
#else /* HIDE_UNIX_SOCKET */
|
#else /* HIDE_UNIX_SOCKET */
|
||||||
sprintf (server.sun_path, "/tmp/lgtd%d", (int) geteuid ());
|
sprintf (server.sun_path, "/tmp/lgtd%d", (int) geteuid ());
|
||||||
#endif /* HIDE_UNIX_SOCKET */
|
#endif /* HIDE_UNIX_SOCKET */
|
||||||
if (connect (s, (struct sockaddr *) &server, strlen (server.sun_path) + 2) < 0)
|
if (connect (s, (struct sockaddr *)&server, strlen (server.sun_path) + 2) < 0)
|
||||||
glibtop_error_io ("unable to connect to local");
|
glibtop_error_io ("unable to connect to local");
|
||||||
|
|
||||||
return (s);
|
return (s);
|
||||||
@@ -201,8 +198,7 @@ connect_to_unix_server (void)
|
|||||||
* internet address passed. Return -1 on error.
|
* internet address passed. Return -1 on error.
|
||||||
*/
|
*/
|
||||||
long
|
long
|
||||||
glibtop_internet_addr (host)
|
glibtop_internet_addr (const char *host)
|
||||||
const char *host;
|
|
||||||
{
|
{
|
||||||
struct hostent *hp; /* pointer to host info for remote host */
|
struct hostent *hp; /* pointer to host info for remote host */
|
||||||
IN_ADDR numeric_addr; /* host address */
|
IN_ADDR numeric_addr; /* host address */
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
/* gcc warning bug */
|
/* gcc warning bug */
|
||||||
unsigned get_pageshift();
|
unsigned get_pageshift(void);
|
||||||
|
|
||||||
|
|
||||||
unsigned long long
|
unsigned long long
|
||||||
@@ -86,7 +86,7 @@ file_to_buffer(glibtop *server, char *buffer, const char *filename)
|
|||||||
|
|
||||||
|
|
||||||
#warning "Ignore the following warning"
|
#warning "Ignore the following warning"
|
||||||
unsigned get_pageshift()
|
unsigned get_pageshift(void)
|
||||||
{
|
{
|
||||||
static unsigned pageshift = 0;
|
static unsigned pageshift = 0;
|
||||||
|
|
||||||
|
@@ -39,7 +39,7 @@ G_BEGIN_DECLS
|
|||||||
#define LINUX_VERSION_CODE(x,y,z) (0x10000*(x) + 0x100*(y) + z)
|
#define LINUX_VERSION_CODE(x,y,z) (0x10000*(x) + 0x100*(y) + z)
|
||||||
|
|
||||||
|
|
||||||
unsigned get_pageshift();
|
unsigned get_pageshift(void);
|
||||||
|
|
||||||
static inline char*
|
static inline char*
|
||||||
next_token(const char *p)
|
next_token(const char *p)
|
||||||
|
@@ -81,7 +81,7 @@ glibtop_open_s (glibtop *server, const char *program_name,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
#ifdef DEBUG
|
||||||
printf ("\nThis machine has %d CPUs.\n\n", server->ncpu);
|
printf ("\nThis machine has %d CPUs.\n\n", server->ncpu);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -82,7 +82,7 @@ get_ISDN_stats (glibtop *server, int *in, int *out)
|
|||||||
|
|
||||||
static gboolean is_ISDN_on (glibtop *server, int *online)
|
static gboolean is_ISDN_on (glibtop *server, int *online)
|
||||||
{
|
{
|
||||||
FILE *f = 0;
|
FILE *f = NULL;
|
||||||
char buffer [BUFSIZ], *p;
|
char buffer [BUFSIZ], *p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user