block: match device path instead of assuming /dev/%s
authorDaniel Golle <daniel@makrotopia.org>
Wed, 12 May 2021 17:05:37 +0000 (18:05 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 15 May 2021 23:28:11 +0000 (00:28 +0100)
commit67d229724865a157592f88863b788e1fd35a2bd4
tree785d16dacfd84f48ca4222aaaa5951be8ec97802
parentd47909ea1e5f32cfc9f756a04edc052717c98ae6
block: match device path instead of assuming /dev/%s

Block devices created by device mapper are in /dev/mapper/ folder,
hence the assumption of the 'block' tool expecting /dev/%s being the
path of a device doesn't hold true.
Match device path from cache instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
block.c