--- projects/libstatgrab/src/libstatgrab/disk_stats.c 2004/04/08 14:30:43 1.68 +++ projects/libstatgrab/src/libstatgrab/disk_stats.c 2004/06/20 17:00:25 1.69 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: disk_stats.c,v 1.68 2004/04/08 14:30:43 tdb Exp $ + * $Id: disk_stats.c,v 1.69 2004/06/20 17:00:25 tdb Exp $ */ #ifdef HAVE_CONFIG_H @@ -410,11 +410,17 @@ sg_disk_io_stats *sg_get_disk_io_stats(int *entries){ rbytes = stats[i].dk_rbytes; wbytes = stats[i].dk_wbytes; #else - /* Before 1.7, NetBSD merged reads and writes. */ + /* Before 2.0, NetBSD merged reads and writes. */ rbytes = wbytes = stats[i].dk_bytes; #endif #else +#ifdef HAVE_DS_RBYTES + rbytes = stats[i].ds_rbytes; + wbytes = stats[i].ds_wbytes; +#else + /* Before 3.5, OpenBSD merged reads and writes */ rbytes = wbytes = stats[i].ds_bytes; +#endif #endif /* Don't keep stats for disks that have never been used. */