--- projects/libstatgrab/src/libstatgrab/disk_stats.c 2004/11/06 23:54:12 1.78 +++ projects/libstatgrab/src/libstatgrab/disk_stats.c 2004/11/07 15:06:49 1.79 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: disk_stats.c,v 1.78 2004/11/06 23:54:12 tdb Exp $ + * $Id: disk_stats.c,v 1.79 2004/11/07 15:06:49 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -392,8 +392,11 @@ sg_disk_io_stats *sg_get_disk_io_stats(int *entries){ } /* We can't seperate the reads from the writes, we'll - just give the same to each. */ - rbytes = wbytes = di->psd_dkwds / 2; + * just give the same to each. (This value is in + * 64-byte chunks according to the pstat header file, + * and can wrap to be negative.) + */ + rbytes = wbytes = ((unsigned long) di->psd_dkwds) * 64LL; /* Skip unused disks. */ if (rbytes == 0 && wbytes == 0) {