aboutsummaryrefslogtreecommitdiff
path: root/archivers/ark/files/patch-ksimdisk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/ark/files/patch-ksimdisk.cpp')
-rw-r--r--archivers/ark/files/patch-ksimdisk.cpp58
1 files changed, 39 insertions, 19 deletions
diff --git a/archivers/ark/files/patch-ksimdisk.cpp b/archivers/ark/files/patch-ksimdisk.cpp
index be1790d8ec21..ecb5bd17da08 100644
--- a/archivers/ark/files/patch-ksimdisk.cpp
+++ b/archivers/ark/files/patch-ksimdisk.cpp
@@ -1,24 +1,44 @@
-Index: ksimdisk.cpp
-===================================================================
-RCS file: /home/kde/kdeutils/ksim/monitors/disk/ksimdisk.cpp,v
-retrieving revision 1.13
-diff -u -5 -p -d -r1.13 ksimdisk.cpp
---- ksimdisk.cpp 2 Nov 2002 14:34:08 -0000 1.13
-+++ ksim/monitors/disk/ksimdisk.cpp 3 Mar 2003 08:48:34 -0000
-@@ -39,11 +39,16 @@
- #include <chart.h>
- #include <progress.h>
- #include <themetypes.h>
+--- ksim/monitors/disk/ksimdisk.cpp.orig Mon Nov 4 11:03:53 2002
++++ ksim/monitors/disk/ksimdisk.cpp Wed Mar 19 13:37:39 2003
+@@ -248,6 +253,16 @@
+ #endif
#ifdef Q_OS_FREEBSD
-+#include <sys/param.h>
-+#if __FreeBSD_version < 500101
- #include <sys/dkstat.h>
++#if __FreeBSD_version < 500107
++#define devstat_getdevs(fd, stats) getdevs(stats)
++#define devstat_selectdevs selectdevs
++#define bytes_read(dev) (dev).bytes_read
++#define bytes_written(dev) (dev).bytes_written
+#else
-+#include <sys/resource.h>
++#define bytes_read(dev) (dev).bytes[DEVSTAT_READ]
++#define bytes_written(dev) (dev).bytes[DEVSTAT_WRITE]
+#endif
- #include <devstat.h>
- #include <stdlib.h>
- #endif
++
+ statinfo diskStats;
+ bzero(&diskStats, sizeof(diskStats));
+ diskStats.dinfo = (struct devinfo *)malloc(sizeof(struct devinfo));
+@@ -258,11 +273,11 @@
+ long generation;
+ device_selection *deviceSelect = 0;
+
+- if (getdevs(&diskStats) < 0)
++ if (devstat_getdevs(NULL, &diskStats) < 0)
+ return;
+
+ deviceAmount = diskStats.dinfo->numdevs;
+- if (selectdevs(&deviceSelect, &selected, &selections,
++ if (devstat_selectdevs(&deviceSelect, &selected, &selections,
+ &generation, diskStats.dinfo->generation,
+ diskStats.dinfo->devices, deviceAmount,
+ 0, 0, 0, 0, DS_SELECT_ONLY, 10, 1) < 0)
+@@ -275,8 +290,8 @@
+ disk = deviceSelect[i].position;
+ device = diskStats.dinfo->devices[disk];
+ blockSize = (device.block_size <= 0 ? 512 : device.block_size);
+- readBlocks = device.bytes_read / blockSize;
+- writeBlocks = device.bytes_written / blockSize;
++ readBlocks = bytes_read(device) / blockSize;
++ writeBlocks = bytes_written(device) / blockSize;
- #ifdef Q_OS_LINUX
+ DiskData diskData;
+ diskData.name = device.device_name