eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
358 stars 105 forks source link

Add support for /proc/partitions parsing #286

Closed berrange closed 9 months ago

berrange commented 9 months ago

This parses the data looking like:

$ cat /proc/partitions major minor #blocks name

259 0 1000204632 nvme0n1 259 1 1048576 nvme0n1p1 259 2 1048576 nvme0n1p2 259 3 104857600 nvme0n1p3 259 4 893248512 nvme0n1p4 253 0 104841216 dm-0 252 0 8388608 zram0 253 1 893232128 dm-1 8 0 3953664 sda 8 1 2097152 sda1 8 2 1855488 sda2 253 2 1853440 dm-2

with the first two lines discarded when parsing.

eminence commented 9 months ago

LGTM, thanks!