Renamed procdiskio to procio

This commit is contained in:
Robert Roth
2017-05-12 05:08:41 +03:00
parent c29d7de9a0
commit 1bf16bfffd
25 changed files with 86 additions and 86 deletions

View File

@@ -433,7 +433,7 @@ glibtop_get_proc_affinity(glibtop_proc_affinity *buf, pid_t pid)
}
/**
* glibtop_get_proc_diskio: Get the disk io stats for the given pid
* glibtop_get_proc_io: Get the io stats for the given pid
* @buf: Buffer where the result will be given
* @pid: Process id to get the io stats for
*
@@ -442,7 +442,7 @@ glibtop_get_proc_affinity(glibtop_proc_affinity *buf, pid_t pid)
* Returns: A list of processor ID of 'buf.number' elements.
*/
void
glibtop_get_proc_diskio(glibtop_proc_diskio *buf, pid_t pid)
glibtop_get_proc_io(glibtop_proc_io *buf, pid_t pid)
{
return glibtop_get_proc_diskio_l(glibtop_global_server, buf, pid);
return glibtop_get_proc_io_l(glibtop_global_server, buf, pid);
}

View File

@@ -90,8 +90,8 @@ const _glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_PPP
_glibtop_init_ppp_p,
#endif
#if GLIBTOP_SUID_PROC_DISKIO
_glibtop_init_proc_diskio_p,
#if GLIBTOP_SUID_PROC_IO
_glibtop_init_proc_io_p,
#endif
NULL
};

View File

@@ -16,7 +16,7 @@ libgtop_sysdeps_suid_2_0_la_SOURCES = suid_open.c close.c swap.c \
proclist.c procstate.c procuid.c \
proctime.c procmem.c procsignal.c \
prockernel.c procsegment.c procargs.c \
procdiskio.c \
procio.c \
procmap.c netload.c ppp.c
libgtop_sysdeps_suid_2_0_la_LDFLAGS = $(LT_VERSION_INFO)

View File

@@ -47,7 +47,7 @@ G_BEGIN_DECLS
#define GLIBTOP_SUID_NETLIST 0
#define GLIBTOP_SUID_PROC_WD 0
#define GLIBTOP_SUID_PROC_AFFINITY 0
#define GLIBTOP_SUID_PROC_DISKIO (1 << GLIBTOP_SYSDEPS_PROC_DISKIO)
#define GLIBTOP_SUID_PROC_IO (1 << GLIBTOP_SYSDEPS_PROC_IO)
G_END_DECLS

View File

@@ -21,23 +21,23 @@
#include <config.h>
#include <glibtop.h>
#include <glibtop/procdiskio.h>
#include <glibtop/procio.h>
static const unsigned long _glibtop_sysdeps_proc_diskio = 0;
static const unsigned long _glibtop_sysdeps_proc_io = 0;
/* Init function. */
void
_glibtop_init_proc_diskio_p (glibtop *server)
_glibtop_init_proc_io_p (glibtop *server)
{
server->sysdeps.proc_diskio = _glibtop_sysdeps_proc_diskio;
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
}
/* Provides detailed information about a process. */
void
glibtop_get_proc_diskio_p (glibtop *server, glibtop_proc_diskio *buf,
glibtop_get_proc_io_p (glibtop *server, glibtop_proc_io *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_diskio));
memset (buf, 0, sizeof (glibtop_proc_io));
}

View File

@@ -10,7 +10,7 @@ libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
proctime.c procmem.c procsignal.c prockernel.c \
procsegment.c procargs.c procmap.c siglist.c \
sysinfo.c netload.c ppp.c glibtop_private.c \
mountlist.c procaffinity.c procdiskio.c \
mountlist.c procaffinity.c procio.c \
fsusage.c netlist.c procopenfiles.c procwd.c
libgtop_sysdeps_2_0_la_LIBADD = @GLIB_LIBS@

View File

@@ -46,6 +46,6 @@
#define GLIBTOP_SUID_PROC_AFFINITY 0
#define GLIBTOP_SUID_PPP 0
#define GLIBTOP_SUID_PROC_FILE 0
#define GLIBTOP_SUID_PROC_DISKIO 0
#define GLIBTOP_SUID_PROC_IO 0
#endif /* __LINUX__GLIBTOP_SERVER_H__ */

View File

@@ -22,29 +22,29 @@
#include <config.h>
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/procdiskio.h>
#include <glibtop/procio.h>
#include "glibtop_private.h"
static const unsigned long _glibtop_sysdeps_proc_diskio =
(1L << GLIBTOP_PROC_DISKIO_RCHAR) + (1L << GLIBTOP_PROC_DISKIO_WCHAR) +
(1L << GLIBTOP_PROC_DISKIO_RBYTES) + (1L << GLIBTOP_PROC_DISKIO_WBYTES);
static const unsigned long _glibtop_sysdeps_proc_io =
(1L << GLIBTOP_PROC_IO_RCHAR) + (1L << GLIBTOP_PROC_IO_WCHAR) +
(1L << GLIBTOP_PROC_IO_RBYTES) + (1L << GLIBTOP_PROC_IO_WBYTES);
/* Init function. */
void
_glibtop_init_proc_diskio_s (glibtop *server)
_glibtop_init_proc_io_s (glibtop *server)
{
server->sysdeps.proc_diskio = _glibtop_sysdeps_proc_diskio;
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
}
/* Provides detailed information about a process. */
void
glibtop_get_proc_diskio_s (glibtop *server, glibtop_proc_diskio *buf, pid_t pid)
glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf, pid_t pid)
{
char buffer [BUFSIZ], *p;
memset (buf, 0, sizeof (glibtop_proc_diskio));
memset (buf, 0, sizeof (glibtop_proc_io));
if (server->os_version_code < LINUX_VERSION_CODE(2, 6, 20))
return;
@@ -66,5 +66,5 @@ glibtop_get_proc_diskio_s (glibtop *server, glibtop_proc_diskio *buf, pid_t pid)
p = skip_token (p);
buf->wbytes = g_ascii_strtoull (p, &p, 10);
buf->flags = _glibtop_sysdeps_proc_diskio;
buf->flags = _glibtop_sysdeps_proc_io;
}

View File

@@ -21,23 +21,23 @@
#include <config.h>
#include <glibtop.h>
#include <glibtop/procdiskio.h>
#include <glibtop/procio.h>
static const unsigned long _glibtop_sysdeps_proc_diskio = 0;
static const unsigned long _glibtop_sysdeps_proc_io = 0;
/* Init function. */
void
_glibtop_init_proc_diskio_s (glibtop *server)
_glibtop_init_proc_io_s (glibtop *server)
{
server->sysdeps.proc_diskio = _glibtop_sysdeps_proc_diskio;
server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
}
/* Provides detailed information about a process. */
void
glibtop_get_proc_diskio_s (glibtop *server, glibtop_proc_diskio *buf,
glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_diskio));
memset (buf, 0, sizeof (glibtop_proc_io));
}

View File

@@ -45,7 +45,7 @@ G_BEGIN_DECLS
#define GLIBTOP_SUID_NETLOAD (1 << GLIBTOP_SYSDEPS_NETLOAD)
#define GLIBTOP_SUID_NETLIST 0
#define GLIBTOP_SUID_PPP (1 << GLIBTOP_SYSDEPS_PPP)
#define GLIBTOP_SUID_PROC_DISKIO (1 << GLIBTOP_SYSDEPS_PROC_DISKIO)
#define GLIBTOP_SUID_PROC_IO (1 << GLIBTOP_SYSDEPS_PROC_IO)
G_END_DECLS