*** empty log message ***

This commit is contained in:
Martin Baulig
1999-12-25 20:44:04 +00:00
parent addb3101f2
commit de90df6a63
6 changed files with 22 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
1999-12-25 Martin Baulig <martin@home-of-linux.org>
* safeio.h: Removed. This is now included in <glibtop-private.h>.
* safeio.h: Removed. This is now included in <glibtop_private.h>.
* netinfo.c: New file.

View File

@@ -23,5 +23,5 @@ libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
include_HEADERS = glibtop_server.h glibtop_machine.h
noinst_HEADERS = glibtop_private.h glibtop_suid.h safeio.h
noinst_HEADERS = glibtop_private.h glibtop_suid.h

View File

@@ -41,10 +41,10 @@ glibtop_init_interface_names_s (glibtop *server)
/* Provides network statistics. */
char *
glibtop_interface *
glibtop_get_interface_names_s (glibtop *server, glibtop_interface_names *buf,
unsigned interface, unsigned number,
unsigned instance, unsigned strategy)
u_int64_t interface, u_int64_t number,
u_int64_t instance, u_int64_t strategy)
{
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);

View File

@@ -32,14 +32,19 @@ static const unsigned long _glibtop_sysdeps_netload = 0;
int
glibtop_init_netload_s (glibtop *server)
{
server->sysdeps.netload = _glibtop_sysdeps_netload;
server->sysdeps.netload = _glibtop_sysdeps_netload;
return 0;
}
/* Provides network statistics. */
int
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
const char *interface)
const char *interface, unsigned transport,
unsigned protocol)
{
memset (buf, 0, sizeof (glibtop_netload));
memset (buf, 0, sizeof (glibtop_netload));
return 0;
}

View File

@@ -32,7 +32,9 @@ static const unsigned long _glibtop_sysdeps_ppp = 0;
int
glibtop_init_ppp_s (glibtop *server)
{
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
return 0;
}
/* Provides PPP/ISDN information. */
@@ -40,5 +42,7 @@ glibtop_init_ppp_s (glibtop *server)
int
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
{
memset (buf, 0, sizeof (glibtop_ppp));
memset (buf, 0, sizeof (glibtop_ppp));
return 0;
}

View File

@@ -31,8 +31,8 @@
/*
* The differences between old and new procfs API are:
* - old has /proc/<pid> file and ioctl() is used to obtain the data.
* - new has /proc/<pid>/* files and read() & friends are used to
* - old has '/proc/<pid>' file and ioctl() is used to obtain the data.
* - new has '/proc/<pid>/*' files and read() & friends are used to
* obtain the data.
* - names of structures and members are different. It's mostly the
* prefix. Old uses `pr' and new uses `ps'.
@@ -127,7 +127,7 @@ glibtop_get_proc_credentials_s(glibtop *server,
else
toread = GLIBTOP_MAX_GROUPS * sizeof(gid_t);
if(s_pread(fd, groups, toread,
&(((struct prcred *)0)->pr_groups[0])) != toread)
(off_t)&(((struct prcred *)0)->pr_groups[0])) != toread)
prcred->pr_ngroups = 0;
}
s_close(fd);