Description: Headers for disk and slab info getopt replacement Author: Liu Xing Author: Michael Tokarev Bug-Debian: http://bugs.debian.org/436805 Bug-Debian: http://bugs.debian.org/408088 Index: b/vmstat.c =================================================================== --- a/vmstat.c 2009-11-24 20:53:00.000000000 +1100 +++ b/vmstat.c 2009-11-24 21:00:49.000000000 +1100 @@ -29,14 +29,15 @@ #include "proc/sysinfo.h" #include "proc/version.h" -static unsigned long dataUnit=1024; -static char szDataUnit [16]; #define UNIT_B 1 #define UNIT_k 1000 #define UNIT_K 1024 #define UNIT_m 1000000 #define UNIT_M 1048576 +static unsigned long dataUnit=UNIT_K; +static char szDataUnit[3] = "K"; + #define VMSTAT 0 #define DISKSTAT 0x00000001 #define VMSUMSTAT 0x00000002 @@ -354,6 +355,7 @@ if ((fDiskstat=fopen("/proc/diskstats", "rb"))){ fclose(fDiskstat); ndisks=getdiskstat(&disks,&partitions); + if (!moreheaders) diskheader(); for(k=0; k0)?tmp:22);