[libgtop] Copy stub sysdeps files to other OS impls to reduce compile errors.



commit 24555c48d05a1f0a84e5258a9afe86bd2dbdd441
Author: ToMe25 <ToMe25 gmx de>
Date:   Sat Apr 24 14:58:33 2021 +0200

    Copy stub sysdeps files to other OS impls to reduce compile errors.

 sysdeps/aix/Makefile.am            |  4 ++--
 sysdeps/aix/disk.c                 | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/aix/glibtop_server.h       |  3 +++
 sysdeps/aix/procio.c               | 43 ++++++++++++++++++++++++++++++++++++++
 sysdeps/bsd/Makefile.am            |  2 +-
 sysdeps/bsd/disk.c                 | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/bsd/glibtop_server.h       |  3 +++
 sysdeps/bsd/procio.c               | 43 ++++++++++++++++++++++++++++++++++++++
 sysdeps/cygwin/Makefile.am         |  2 +-
 sysdeps/cygwin/disk.c              | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/cygwin/glibtop_server.h    |  3 ++-
 sysdeps/darwin/Makefile.am         |  2 +-
 sysdeps/darwin/disk.c              | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/darwin/glibtop_server.h    |  1 +
 sysdeps/freebsd/Makefile.am        |  2 +-
 sysdeps/freebsd/disk.c             | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/freebsd/glibtop_server.h   |  3 ++-
 sysdeps/linux/glibtop_server.h     |  2 +-
 sysdeps/openbsd/Makefile.am        |  2 +-
 sysdeps/openbsd/disk.c             | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/openbsd/glibtop_server.h   |  1 +
 sysdeps/osf1/Makefile.am           |  2 +-
 sysdeps/osf1/disk.c                | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/osf1/glibtop_server.h      |  3 +++
 sysdeps/osf1/procio.c              | 43 ++++++++++++++++++++++++++++++++++++++
 sysdeps/solaris/Makefile.am        |  2 +-
 sysdeps/solaris/disk.c             | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/solaris/glibtop_server.h   |  3 +++
 sysdeps/solaris/procio.c           | 43 ++++++++++++++++++++++++++++++++++++++
 sysdeps/stub/glibtop_server.h      |  5 +++--
 sysdeps/stub_suid/glibtop_server.h |  2 +-
 sysdeps/sun4/Makefile.am           |  2 +-
 sysdeps/sun4/disk.c                | 42 +++++++++++++++++++++++++++++++++++++
 sysdeps/sun4/glibtop_server.h      |  3 +++
 sysdeps/sun4/procio.c              | 43 ++++++++++++++++++++++++++++++++++++++
 35 files changed, 629 insertions(+), 16 deletions(-)
---
diff --git a/sysdeps/aix/Makefile.am b/sysdeps/aix/Makefile.am
index 2ab38012..6fc527e1 100644
--- a/sysdeps/aix/Makefile.am
+++ b/sysdeps/aix/Makefile.am
@@ -5,9 +5,9 @@ noinst_LTLIBRARIES              = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
 
 libgtop_sysdeps_2_0_la_SOURCES  = siglist.c nosuid.c mem.c swap.c uptime.c \
                                  procargs.c prockernel.c proclist.c procmap.c \
-                                 procmem.c procsegment.c procsignal.c \
+                                 procmem.c procsegment.c procsignal.c disk.c \
                                  proctime.c procuid.c procmem.c utils.c \
-                                 procstate.c sysinfo.c netlist.c
+                                 procstate.c sysinfo.c netlist.c procio.c
 
 
 libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/aix/disk.c b/sysdeps/aix/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/aix/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/aix/glibtop_server.h b/sysdeps/aix/glibtop_server.h
index c6eacc42..705d4c13 100644
--- a/sysdeps/aix/glibtop_server.h
+++ b/sysdeps/aix/glibtop_server.h
@@ -25,6 +25,7 @@
 G_BEGIN_DECLS
 
 #define GLIBTOP_SUID_CPU               (1 << GLIBTOP_SYSDEPS_CPU)
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               0
 #define GLIBTOP_SUID_SWAP              0
 #define GLIBTOP_SUID_UPTIME            0
@@ -45,6 +46,8 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           (1 << GLIBTOP_SYSDEPS_NETLOAD)
 #define GLIBTOP_SUID_NETLIST           0
 #define GLIBTOP_SUID_PPP               0
+#define GLIBTOP_SUID_PROC_OPEN_FILES   0
+#define GLIBTOP_SUID_PROC_IO           0
 
 G_END_DECLS
 
diff --git a/sysdeps/aix/procio.c b/sysdeps/aix/procio.c
new file mode 100644
index 00000000..a4846aee
--- /dev/null
+++ b/sysdeps/aix/procio.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2017 Robert Roth
+   This file is part of LibGTop.
+
+   Contributed by Robert Roth <robert roth off gmail com>, February 2017.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/procio.h>
+
+static const unsigned long _glibtop_sysdeps_proc_io = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_proc_io_s (glibtop *server)
+{
+       server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
+                        pid_t pid)
+{
+       memset (buf, 0, sizeof (glibtop_proc_io));
+}
diff --git a/sysdeps/bsd/Makefile.am b/sysdeps/bsd/Makefile.am
index a6692376..1b973987 100644
--- a/sysdeps/bsd/Makefile.am
+++ b/sysdeps/bsd/Makefile.am
@@ -10,7 +10,7 @@ libgtop_sysdeps_2_0_la_LDFLAGS        = $(LT_VERSION_INFO)
 libgtop_sysdeps_suid_2_0_la_LIBADD     = $(KVM_LIBS)
 libgtop_sysdeps_suid_2_0_la_SOURCES    = open.c close.c cpu.c mem.c swap.c \
                                  uptime.c loadavg.c shm_limits.c msg_limits.c \
-                                 sem_limits.c procaffinity.c \
+                                 sem_limits.c disk.c procaffinity.c procio.c \
                                  proclist.c procstate.c procuid.c \
                                  proctime.c procmem.c procsignal.c prockernel.c \
                                  procsegment.c procargs.c procmap.c netlist.c \
diff --git a/sysdeps/bsd/disk.c b/sysdeps/bsd/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/bsd/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/bsd/glibtop_server.h b/sysdeps/bsd/glibtop_server.h
index ca4dde05..4e5fe35e 100644
--- a/sysdeps/bsd/glibtop_server.h
+++ b/sysdeps/bsd/glibtop_server.h
@@ -25,6 +25,7 @@
 G_BEGIN_DECLS
 
 #define GLIBTOP_SUID_CPU               (1 << GLIBTOP_SYSDEPS_CPU)
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               (1 << GLIBTOP_SYSDEPS_MEM)
 #define GLIBTOP_SUID_SWAP              (1 << GLIBTOP_SYSDEPS_SWAP)
 #define GLIBTOP_SUID_UPTIME            (1 << GLIBTOP_SYSDEPS_UPTIME)
@@ -47,6 +48,8 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_PPP               (1 << GLIBTOP_SYSDEPS_PPP)
 #define GLIBTOP_SUID_PROC_WD           0
 #define GLIBTOP_SUID_PROC_AFFINITY     0
+#define GLIBTOP_SUID_PROC_OPEN_FILES   0
+#define GLIBTOP_SUID_PROC_IO           0
 
 G_END_DECLS
 
diff --git a/sysdeps/bsd/procio.c b/sysdeps/bsd/procio.c
new file mode 100644
index 00000000..a4846aee
--- /dev/null
+++ b/sysdeps/bsd/procio.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2017 Robert Roth
+   This file is part of LibGTop.
+
+   Contributed by Robert Roth <robert roth off gmail com>, February 2017.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/procio.h>
+
+static const unsigned long _glibtop_sysdeps_proc_io = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_proc_io_s (glibtop *server)
+{
+       server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
+                        pid_t pid)
+{
+       memset (buf, 0, sizeof (glibtop_proc_io));
+}
diff --git a/sysdeps/cygwin/Makefile.am b/sysdeps/cygwin/Makefile.am
index e3c9f785..4e983a6b 100644
--- a/sysdeps/cygwin/Makefile.am
+++ b/sysdeps/cygwin/Makefile.am
@@ -2,7 +2,7 @@ AM_CPPFLAGS                     = @AM_CPPFLAGS@
 
 noinst_LTLIBRARIES             = libgtop_sysdeps-2.0.la
 
-libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
+libgtop_sysdeps_2_0_la_SOURCES = open.c close.c cpu.c disk.c mem.c swap.c \
                                  uptime.c loadavg.c mountlist.c shm_limits.c msg_limits.c \
                                  sem_limits.c proclist.c procstate.c procuid.c \
                                  proctime.c procmem.c procsignal.c prockernel.c \
diff --git a/sysdeps/cygwin/disk.c b/sysdeps/cygwin/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/cygwin/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/cygwin/glibtop_server.h b/sysdeps/cygwin/glibtop_server.h
index bfd7cc65..ea29c287 100644
--- a/sysdeps/cygwin/glibtop_server.h
+++ b/sysdeps/cygwin/glibtop_server.h
@@ -23,6 +23,7 @@
 #define __CYGWIN__GLIBTOP_SERVER_H__
 
 #define GLIBTOP_SUID_CPU               0
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               0
 #define GLIBTOP_SUID_SWAP              0
 #define GLIBTOP_SUID_UPTIME            0
@@ -45,6 +46,6 @@
 #define GLIBTOP_SUID_PROC_AFFINITY     0
 #define GLIBTOP_SUID_PROC_WD           0
 #define GLIBTOP_SUID_PPP               0
-#define GLIBTOP_SUID_PROC_OPEN_FILES           0
+#define GLIBTOP_SUID_PROC_OPEN_FILES   0
 
 #endif /* __CYGWIN__GLIBTOP_SERVER_H__ */
diff --git a/sysdeps/darwin/Makefile.am b/sysdeps/darwin/Makefile.am
index dab61b29..33a78353 100644
--- a/sysdeps/darwin/Makefile.am
+++ b/sysdeps/darwin/Makefile.am
@@ -4,7 +4,7 @@ noinst_LTLIBRARIES                      = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
 
 libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c
 
-libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c \
+libgtop_sysdeps_suid_2_0_la_SOURCES = open.c close.c disk.c \
 cpu.c mem.c swap.c uptime.c loadavg.c shm_limits.c msg_limits.c \
 sem_limits.c procaffinity.c proclist.c procstate.c procuid.c proctime.c \
 procmem.c procsignal.c prockernel.c procsegment.c procargs.c \
diff --git a/sysdeps/darwin/disk.c b/sysdeps/darwin/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/darwin/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/darwin/glibtop_server.h b/sysdeps/darwin/glibtop_server.h
index 92c433ab..a6cd922b 100644
--- a/sysdeps/darwin/glibtop_server.h
+++ b/sysdeps/darwin/glibtop_server.h
@@ -23,6 +23,7 @@
 G_BEGIN_DECLS
 
 #define GLIBTOP_SUID_CPU               (1 << GLIBTOP_SYSDEPS_CPU)
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               (1 << GLIBTOP_SYSDEPS_MEM)
 #define GLIBTOP_SUID_SWAP              (1 << GLIBTOP_SYSDEPS_SWAP)
 #define GLIBTOP_SUID_UPTIME            (1 << GLIBTOP_SYSDEPS_UPTIME)
diff --git a/sysdeps/freebsd/Makefile.am b/sysdeps/freebsd/Makefile.am
index 7cacb707..1a00506a 100644
--- a/sysdeps/freebsd/Makefile.am
+++ b/sysdeps/freebsd/Makefile.am
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES              = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
 
 libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c shm_limits.c \
                                  cpu.c msg_limits.c sem_limits.c loadavg.c \
-                                 uptime.c netlist.c fsusage.c mem.c \
+                                 uptime.c netlist.c fsusage.c mem.c disk.c \
                                  mountlist.c procopenfiles.c procwd.c \
                                  procaffinity.c glibtop_private.c open.c
 
diff --git a/sysdeps/freebsd/disk.c b/sysdeps/freebsd/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/freebsd/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/freebsd/glibtop_server.h b/sysdeps/freebsd/glibtop_server.h
index 86a02eea..56b1a0d0 100644
--- a/sysdeps/freebsd/glibtop_server.h
+++ b/sysdeps/freebsd/glibtop_server.h
@@ -38,6 +38,7 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           (1 << GLIBTOP_SYSDEPS_NETLOAD)
 #define GLIBTOP_SUID_PPP               (1 << GLIBTOP_SYSDEPS_PPP)
 #define GLIBTOP_SUID_CPU               0
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               0
 #define GLIBTOP_SUID_UPTIME            0
 #define GLIBTOP_SUID_LOADAVG           0
@@ -47,7 +48,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_IO   (1 << GLIBTOP_SYSDEPS_PROC_IO)
+#define GLIBTOP_SUID_PROC_IO           (1 << GLIBTOP_SYSDEPS_PROC_IO)
 #define GLIBTOP_SUID_PROC_OPEN_FILES   0
 
 G_END_DECLS
diff --git a/sysdeps/linux/glibtop_server.h b/sysdeps/linux/glibtop_server.h
index 43dd9d9f..0d2788c8 100644
--- a/sysdeps/linux/glibtop_server.h
+++ b/sysdeps/linux/glibtop_server.h
@@ -47,6 +47,6 @@
 #define GLIBTOP_SUID_PROC_AFFINITY     0
 #define GLIBTOP_SUID_PPP               0
 #define GLIBTOP_SUID_PROC_OPEN_FILES   0
-#define GLIBTOP_SUID_PROC_IO   0
+#define GLIBTOP_SUID_PROC_IO           0
 
 #endif /* __LINUX__GLIBTOP_SERVER_H__ */
diff --git a/sysdeps/openbsd/Makefile.am b/sysdeps/openbsd/Makefile.am
index 41b4b6b0..97d5f8ad 100644
--- a/sysdeps/openbsd/Makefile.am
+++ b/sysdeps/openbsd/Makefile.am
@@ -3,7 +3,7 @@ AM_CPPFLAGS                     = @AM_CPPFLAGS@
 noinst_LTLIBRARIES             = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
 
 libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c sysinfo.c \
-                                 cpu.c loadavg.c \
+                                 cpu.c loadavg.c disk.c \
                                  uptime.c netlist.c fsusage.c mem.c \
                                  mountlist.c procopenfiles.c procwd.c \
                                  procaffinity.c glibtop_private.c open.c
diff --git a/sysdeps/openbsd/disk.c b/sysdeps/openbsd/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/openbsd/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/openbsd/glibtop_server.h b/sysdeps/openbsd/glibtop_server.h
index 54ca8cbb..967bbe4a 100644
--- a/sysdeps/openbsd/glibtop_server.h
+++ b/sysdeps/openbsd/glibtop_server.h
@@ -41,6 +41,7 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           (1 << GLIBTOP_SYSDEPS_NETLOAD)
 #define GLIBTOP_SUID_PPP               (1 << GLIBTOP_SYSDEPS_PPP)
 #define GLIBTOP_SUID_CPU               0
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               0
 #define GLIBTOP_SUID_UPTIME            0
 #define GLIBTOP_SUID_LOADAVG           0
diff --git a/sysdeps/osf1/Makefile.am b/sysdeps/osf1/Makefile.am
index 9b87cc88..af2cecab 100644
--- a/sysdeps/osf1/Makefile.am
+++ b/sysdeps/osf1/Makefile.am
@@ -5,7 +5,7 @@ noinst_LTLIBRARIES              = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
 
 libgtop_sysdeps_2_0_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \
                                  uptime.c loadavg.c shm_limits.c msg_limits.c \
-                                 sem_limits.c ppp.c
+                                 sem_limits.c ppp.c procio.c disk.c
 libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
 libgtop_sysdeps_2_0_la_LIBADD  = -lmach
 
diff --git a/sysdeps/osf1/disk.c b/sysdeps/osf1/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/osf1/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/osf1/glibtop_server.h b/sysdeps/osf1/glibtop_server.h
index 11b37a4a..70901a14 100644
--- a/sysdeps/osf1/glibtop_server.h
+++ b/sysdeps/osf1/glibtop_server.h
@@ -25,6 +25,7 @@
 G_BEGIN_DECLS
 
 #define GLIBTOP_SUID_CPU               0
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               0
 #define GLIBTOP_SUID_SWAP              0
 #define GLIBTOP_SUID_UPTIME            0
@@ -45,6 +46,8 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           (1 << GLIBTOP_SYSDEPS_NETLOAD)
 #define GLIBTOP_SUID_NETLIST           0
 #define GLIBTOP_SUID_PPP               0
+#define GLIBTOP_SUID_PROC_OPEN_FILES   0
+#define GLIBTOP_SUID_PROC_IO           0
 
 G_END_DECLS
 
diff --git a/sysdeps/osf1/procio.c b/sysdeps/osf1/procio.c
new file mode 100644
index 00000000..a4846aee
--- /dev/null
+++ b/sysdeps/osf1/procio.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2017 Robert Roth
+   This file is part of LibGTop.
+
+   Contributed by Robert Roth <robert roth off gmail com>, February 2017.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/procio.h>
+
+static const unsigned long _glibtop_sysdeps_proc_io = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_proc_io_s (glibtop *server)
+{
+       server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
+                        pid_t pid)
+{
+       memset (buf, 0, sizeof (glibtop_proc_io));
+}
diff --git a/sysdeps/solaris/Makefile.am b/sysdeps/solaris/Makefile.am
index 8ca9df04..b3d3d513 100644
--- a/sysdeps/solaris/Makefile.am
+++ b/sysdeps/solaris/Makefile.am
@@ -8,7 +8,7 @@ libgtop_sysdeps_2_0_la_SOURCES  = open.c close.c siglist.c cpu.c mem.c \
                                  proclist.c procstate.c procuid.c \
                                  proctime.c procmem.c procsignal.c \
                                  prockernel.c procsegment.c procargs.c \
-                                 procopenfiles.c \
+                                 procopenfiles.c procio.c disk.c \
                                  procmap.c netload.c ppp.c procdata.c netlist.c
 
 libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
diff --git a/sysdeps/solaris/disk.c b/sysdeps/solaris/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/solaris/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/solaris/glibtop_server.h b/sysdeps/solaris/glibtop_server.h
index e57057e0..cac573b5 100644
--- a/sysdeps/solaris/glibtop_server.h
+++ b/sysdeps/solaris/glibtop_server.h
@@ -25,6 +25,7 @@
 G_BEGIN_DECLS
 
 #define GLIBTOP_SUID_CPU               0
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               0
 #define GLIBTOP_SUID_SWAP              0
 #define GLIBTOP_SUID_UPTIME            0
@@ -45,6 +46,8 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           0
 #define GLIBTOP_SUID_NETLIST           0
 #define GLIBTOP_SUID_PPP               0
+#define GLIBTOP_SUID_PROC_OPEN_FILES   0
+#define GLIBTOP_SUID_PROC_IO           0
 
 G_END_DECLS
 
diff --git a/sysdeps/solaris/procio.c b/sysdeps/solaris/procio.c
new file mode 100644
index 00000000..a4846aee
--- /dev/null
+++ b/sysdeps/solaris/procio.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2017 Robert Roth
+   This file is part of LibGTop.
+
+   Contributed by Robert Roth <robert roth off gmail com>, February 2017.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/procio.h>
+
+static const unsigned long _glibtop_sysdeps_proc_io = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_proc_io_s (glibtop *server)
+{
+       server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
+                        pid_t pid)
+{
+       memset (buf, 0, sizeof (glibtop_proc_io));
+}
diff --git a/sysdeps/stub/glibtop_server.h b/sysdeps/stub/glibtop_server.h
index 0f8bd194..1307efa0 100644
--- a/sysdeps/stub/glibtop_server.h
+++ b/sysdeps/stub/glibtop_server.h
@@ -46,8 +46,9 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           0
 #define GLIBTOP_SUID_NETLIST           0
 #define GLIBTOP_SUID_PPP               0
-#define GLIBTOP_SUID_PROC_WD            0
-#define GLIBTOP_SUID_PROC_AFFINITY      0
+#define GLIBTOP_SUID_PROC_WD           0
+#define GLIBTOP_SUID_PROC_AFFINITY     0
+#define GLIBTOP_SUID_PROC_IO           0
 
 G_END_DECLS
 
diff --git a/sysdeps/stub_suid/glibtop_server.h b/sysdeps/stub_suid/glibtop_server.h
index 15fe2e11..60e960ca 100644
--- a/sysdeps/stub_suid/glibtop_server.h
+++ b/sysdeps/stub_suid/glibtop_server.h
@@ -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_IO   (1 << GLIBTOP_SYSDEPS_PROC_IO)
+#define GLIBTOP_SUID_PROC_IO           (1 << GLIBTOP_SYSDEPS_PROC_IO)
 
 G_END_DECLS
 
diff --git a/sysdeps/sun4/Makefile.am b/sysdeps/sun4/Makefile.am
index ec8fc431..a92458b7 100644
--- a/sysdeps/sun4/Makefile.am
+++ b/sysdeps/sun4/Makefile.am
@@ -3,7 +3,7 @@ AM_CPPFLAGS                     = @AM_CPPFLAGS@
 
 noinst_LTLIBRARIES             = libgtop_sysdeps-2.0.la libgtop_sysdeps_suid-2.0.la
 
-libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c
+libgtop_sysdeps_2_0_la_SOURCES = nosuid.c siglist.c disk.c procio.c
 libgtop_sysdeps_2_0_la_LDFLAGS = $(LT_VERSION_INFO)
 libgtop_sysdeps_2_0_la_LIBADD  = -lkvm
 
diff --git a/sysdeps/sun4/disk.c b/sysdeps/sun4/disk.c
new file mode 100644
index 00000000..a946fdf5
--- /dev/null
+++ b/sysdeps/sun4/disk.c
@@ -0,0 +1,42 @@
+/* Copyright (C) 1998-99 Martin Baulig
+   This file is part of LibGTop 1.0.
+
+   Contributed by James Dominic P. Guana <guana histark gmail com>, May 2020.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/disk.h>
+
+static const unsigned long _glibtop_sysdeps_disk = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_disk_s (glibtop *server)
+{
+       server->sysdeps.disk = _glibtop_sysdeps_disk;
+}
+
+/* Provides information about disk usage. */
+
+void
+glibtop_get_disk_s (glibtop *server, glibtop_disk *buf)
+{
+       memset (buf, 0, sizeof (glibtop_disk));
+}
diff --git a/sysdeps/sun4/glibtop_server.h b/sysdeps/sun4/glibtop_server.h
index fa4439a2..123bc429 100644
--- a/sysdeps/sun4/glibtop_server.h
+++ b/sysdeps/sun4/glibtop_server.h
@@ -25,6 +25,7 @@
 G_BEGIN_DECLS
 
 #define GLIBTOP_SUID_CPU               (1 << GLIBTOP_SYSDEPS_CPU)
+#define GLIBTOP_SUID_DISK              0
 #define GLIBTOP_SUID_MEM               (1 << GLIBTOP_SYSDEPS_MEM)
 #define GLIBTOP_SUID_SWAP              (1 << GLIBTOP_SYSDEPS_SWAP)
 #define GLIBTOP_SUID_UPTIME            (1 << GLIBTOP_SYSDEPS_UPTIME)
@@ -45,6 +46,8 @@ G_BEGIN_DECLS
 #define GLIBTOP_SUID_NETLOAD           0
 #define GLIBTOP_SUID_NETLIST           0
 #define GLIBTOP_SUID_PPP               0
+#define GLIBTOP_SUID_PROC_OPEN_FILES   0
+#define GLIBTOP_SUID_PROC_IO           0
 
 G_END_DECLS
 
diff --git a/sysdeps/sun4/procio.c b/sysdeps/sun4/procio.c
new file mode 100644
index 00000000..a4846aee
--- /dev/null
+++ b/sysdeps/sun4/procio.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 2017 Robert Roth
+   This file is part of LibGTop.
+
+   Contributed by Robert Roth <robert roth off gmail com>, February 2017.
+
+   LibGTop is free software; you can redistribute it and/or modify it
+   under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License,
+   or (at your option) any later version.
+
+   LibGTop is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+   for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with LibGTop; see the file COPYING. If not, write to the
+   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.
+*/
+
+#include <config.h>
+#include <glibtop.h>
+#include <glibtop/procio.h>
+
+static const unsigned long _glibtop_sysdeps_proc_io = 0;
+
+/* Init function. */
+
+void
+_glibtop_init_proc_io_s (glibtop *server)
+{
+       server->sysdeps.proc_io = _glibtop_sysdeps_proc_io;
+}
+
+/* Provides detailed information about a process. */
+
+void
+glibtop_get_proc_io_s (glibtop *server, glibtop_proc_io *buf,
+                        pid_t pid)
+{
+       memset (buf, 0, sizeof (glibtop_proc_io));
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]