Inspect a buffer from the start of a disk image and return its formatted
sector size, if any can be determined.
Find ESP partitions which sit at the same hierarchy level as device.
This is basically a Rust version of:
https://github.com/coreos/coreos-assembler/blob/d3c7ec094a02/src/cmd-buildextend-live#L492-L495
This is a bit fuzzy, but… this function will return every block device in the parent
hierarchy of device capable of containing other partitions. So e.g. parent devices of type
“part” doesn’t match, but “disk” and “mpath” does.
Get the size of a block device.
Returns filesystems with given label.
If multiple filesystems with the label have the same UUID, we only return one of them.
Get the size of the GPT metadata at the start of the disk.
Get the logical sector size of a block device.
Get the sector size of the block device at a given path.
Checks if underlying device is IBM DASD disk