]> granicus.if.org Git - procps-ng/commit
library: Update diskstat API
authorCraig Small <csmall@enc.com.au>
Tue, 7 Jul 2015 12:42:06 +0000 (22:42 +1000)
committerCraig Small <csmall@enc.com.au>
Tue, 7 Jul 2015 12:42:06 +0000 (22:42 +1000)
commite445f7e6c5539594600ace7a722dafa3b91a5374
tree60ddf007f46e2e34ae0d4b7f28b65b0127474b5a
parent62f9a51532f5dac19fcf4dfdaaa37c1114049500
library: Update diskstat API

The calls for reading diskstat have been moved out of
sysinfo and into new files diskstat.[ch] These new
library calls follow the standard pattern for the
new libprocps.

vmstat is updated to use the new API and also got
the weighted IO time added.

vmstat -p previously would only show partitions, not
disks. There does not appear to be any good reason to
artifically deny a user to use this command on a disk,
rather than a partition so this restriction was lifted.

I also realised using int for devid means you can send
the library negative numbers, the index uses unsigned int.
Other similiar calls will need to be fixed too.

Signed-off-by: Craig Small <csmall@enc.com.au>
Makefile.am
proc/diskstat.c [new file with mode: 0644]
proc/diskstat.h [new file with mode: 0644]
proc/libprocps.sym
proc/sysinfo.c
proc/sysinfo.h
vmstat.c