diff options
Diffstat (limited to 'sysutils/gkrellm/patches')
-rw-r--r-- | sysutils/gkrellm/patches/patch-ac | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sysutils/gkrellm/patches/patch-ac b/sysutils/gkrellm/patches/patch-ac new file mode 100644 index 00000000000..be0e2740b04 --- /dev/null +++ b/sysutils/gkrellm/patches/patch-ac @@ -0,0 +1,31 @@ +$NetBSD: patch-ac,v 1.3 2002/11/07 15:07:46 fredb Exp $ + +--- src/disk.c.orig Tue Jan 1 15:08:07 2002 ++++ src/disk.c +@@ -446,10 +446,24 @@ + * d.xfer value (number of transfers) but there a scaling problem: + * d.xfer is usually much more smaller thant d.dk_bytes... */ + ++ /* Separate read/write stats were implemented in NetBSD 1.6K. */ ++ + disk = (DiskMon *) list->data; +- disk->rblk = d.dk_bytes / 512; /* block size hardcoded : +- * d.dk_byteshift is always 0 ?? */ ++#if __NetBSD_Version__ >= 106110000 ++ /* d.dk_byteshift is not set in, or used, by the kernel as of ++ * NetBSD 1.6K, but maybe one day... In the meantime, NetBSD ++ * only supports a blocksize of 512 == 2^^9, so assume that. */ ++ if (d.dk_byteshift == 0) { ++ disk->rblk = d.dk_rbytes >> 9; ++ disk->wblk = d.dk_wbytes >> 9; ++ } else { ++ disk->rblk = d.dk_rbytes / d.dk_byteshift; ++ disk->wblk = d.dk_wbytes / d.dk_byteshift; ++ } ++#else ++ disk->rblk = d.dk_bytes >> 9; + disk->wblk = 0; ++#endif + + composite_disk->rblk += disk->rblk; + composite_disk->wblk += disk->wblk; /* useless, isn't it ? :-D */ |