summaryrefslogtreecommitdiff
path: root/sysdeps/openbsd
diff options
context:
space:
mode:
authorToMe25 <ToMe25@gmx.de>2021-04-24 14:58:33 +0200
committerToMe25 <ToMe25@gmx.de>2021-04-24 14:58:33 +0200
commit24555c48d05a1f0a84e5258a9afe86bd2dbdd441 (patch)
tree00d01e2f7c29774041511a03a72ed53ff8a15a87 /sysdeps/openbsd
parentb51925dbd9fca8b7d570d16cab8565b2fd99127b (diff)
downloadlibgtop-24555c48d05a1f0a84e5258a9afe86bd2dbdd441.tar.gz
Copy stub sysdeps files to other OS impls to reduce compile errors.
Diffstat (limited to 'sysdeps/openbsd')
-rw-r--r--sysdeps/openbsd/Makefile.am2
-rw-r--r--sysdeps/openbsd/disk.c42
-rw-r--r--sysdeps/openbsd/glibtop_server.h1
3 files changed, 44 insertions, 1 deletions
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