Add support for /proc/partitions parsing #286
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.