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>
This commit is contained in:
@@ -156,6 +156,8 @@ proc_libprocps_la_SOURCES = \
|
||||
proc/alloc.h \
|
||||
proc/devname.c \
|
||||
proc/devname.h \
|
||||
proc/diskstat.c \
|
||||
proc/diskstat.h \
|
||||
proc/escape.c \
|
||||
proc/escape.h \
|
||||
proc/procps-private.h \
|
||||
@@ -185,6 +187,7 @@ proc_libprocps_la_includedir = $(includedir)/proc/
|
||||
proc_libprocps_la_include_HEADERS = \
|
||||
proc/alloc.h \
|
||||
proc/devname.h \
|
||||
proc/diskstat.h \
|
||||
proc/escape.h \
|
||||
proc/procps.h \
|
||||
proc/pwcache.h \
|
||||
|
Reference in New Issue
Block a user