diff options
author | fredb <fredb@pkgsrc.org> | 2002-11-07 15:07:46 +0000 |
---|---|---|
committer | fredb <fredb@pkgsrc.org> | 2002-11-07 15:07:46 +0000 |
commit | 06824bdf023e94548b16c39db93732e3015b9b59 (patch) | |
tree | f4d1893db5965a688f9a22c62bc64af420378bfd /sysutils/gkrellm/patches | |
parent | 3a8d224370701cfa9111fbcd170382ab9c551691 (diff) | |
download | pkgsrc-06824bdf023e94548b16c39db93732e3015b9b59.tar.gz |
Make this build on NetBSD 1.6K (new, separate read and write disk
stats), set OSVERSION_SPECIFIC, and bump PKGREVISION.
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 */ |