scripts: sd_fusing: support device symlinks in ensure_parttable()
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 13 Jun 2024 11:12:41 +0000 (13:12 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 4 Dec 2024 11:00:01 +0000 (12:00 +0100)
commitd456397af72545abf6493d4290d56646c814e5bc
tree8f7405600d46cc64ceb2789226dca0e341dc9e4f
parent58bb2fda75a8a0d7a1a04960cdf6861e75e154ee
scripts: sd_fusing: support device symlinks in ensure_parttable()

sd_fusing needs to support referring to devices by symlinks created by udev like
/dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000000272-0. Their partitions
are named /dev/disk/by-id/usb-Generic_STORAGE_DEVICE_000000000272-0-partX. Therefore
there is no universal way to access both /dev/sdXY and the symlinked
partitions and using get_partition_device() is the way to go.

Change-Id: I4c586f8e9b6e3940faa6055c90835bbff1777ec5
Fixes: 43ab41c7e7 ("sd_fusing.py: Ensure selected flashing target actually matches what is on device")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
sd_fusing.py