rewrite linux diskio code
authorPhil Sutter <phil@nwl.cc>
Thu, 25 Dec 2008 15:36:29 +0000 (16:36 +0100)
committerPhil Sutter <phil@nwl.cc>
Sun, 22 Feb 2009 01:57:11 +0000 (02:57 +0100)
commit4161f90c6fd53bb73bebfc8b75fac171ab06332f
tree39d3934a181927f00fd23a0d7aaa3e8a67492bde
parenta619cb3e3ce1cbac46eddefd118b27e77af57f57
rewrite linux diskio code

Instead of using a hardcoded maximum number of slots for
stats of different disks, use a linked list. Also since the algorithm to
update each device's counters is the same for updating the totals, share
equal code, which in my eyes not only saves a bunch of LoC, but also
drastically increases readability.
src/common.c
src/common.h
src/diskio.c
src/diskio.h