diff options
author | alane <alane@FreeBSD.org> | 2003-04-06 06:16:12 +0800 |
---|---|---|
committer | alane <alane@FreeBSD.org> | 2003-04-06 06:16:12 +0800 |
commit | fe14168a6a9e96b50d94f97bbe29560f10ad71b6 (patch) | |
tree | 7ad4b1573f5e13aa04ff9e7a475d08292382e77f /security/kgpg-kde4/files/patch-ksimdisk.cpp | |
parent | b858b8112101608ceebc7305dda632a422120c53 (diff) | |
download | freebsd-ports-graphics-fe14168a6a9e96b50d94f97bbe29560f10ad71b6.tar.gz freebsd-ports-graphics-fe14168a6a9e96b50d94f97bbe29560f10ad71b6.tar.zst freebsd-ports-graphics-fe14168a6a9e96b50d94f97bbe29560f10ad71b6.zip |
Rejoice, for the long awaited upgrade to kde 3.1.1 is here!
Diffstat (limited to 'security/kgpg-kde4/files/patch-ksimdisk.cpp')
-rw-r--r-- | security/kgpg-kde4/files/patch-ksimdisk.cpp | 58 |
1 files changed, 39 insertions, 19 deletions
diff --git a/security/kgpg-kde4/files/patch-ksimdisk.cpp b/security/kgpg-kde4/files/patch-ksimdisk.cpp index be1790d8ec2..ecb5bd17da0 100644 --- a/security/kgpg-kde4/files/patch-ksimdisk.cpp +++ b/security/kgpg-kde4/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 |