summaryrefslogtreecommitdiff
path: root/sysutils/xfce4-diskperf-plugin/patches/patch-aa
blob: cf1f5df111385740ba20ea5459c02c74a37d38a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-aa,v 1.1.1.1 2003/12/03 05:07:32 martti Exp $

--- panel-plugin/devperf.c.orig	Tue Nov 11 01:00:41 2003
+++ panel-plugin/devperf.c	Mon Nov 17 10:39:35 2003
@@ -292,8 +292,14 @@
 	gettimeofday (&tv, 0);
 	perf->timestamp_ns = (uint64_t)1000ull * 1000ull * 1000ull *
 		tv.tv_sec + 1000ull * tv.tv_usec;
+#if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
+	/* NetBSD < 1.6K does not have separate read/write statistics. */
+	perf->rbytes = drive.dk_bytes;
+	perf->wbytes = drive.dk_bytes;
+#else
 	perf->rbytes = drive.dk_rbytes;
 	perf->wbytes = drive.dk_wbytes;
+#endif
   /*
    * XXX - Currently, I don't know of any way to determine write/read busy
    * time separatly.