diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-11-06 12:04:05 +0100 |
---|---|---|
committer | Roland Hieber <rhi@pengutronix.de> | 2023-11-24 11:31:28 +0100 |
commit | b67e96895f52d7aad9652f2de5c6022e63167317 (patch) | |
tree | cefd7780924eed3c5f411c85022ec8e178d12b7f /src/barebox-state/backend_bucket_circular.c | |
parent | 1cd62596dbd7e261714433c2758ac60498c73cf5 (diff) | |
download | dt-utils-b67e96895f52d7aad9652f2de5c6022e63167317.tar.gz dt-utils-b67e96895f52d7aad9652f2de5c6022e63167317.tar.xz |
libdt: prefer first found disk when looking for block devices
Recent rework introduced a regression for state located in the eMMC
user area described by DT fixed partitions. Whereas before, the first
device with type "disk" was taken, dt-utils will now iterate over all
devices to try to find a matching GPT partition. If it doesn't find any,
it will instead take the last device with type "disk", which will be the
second boot partition for eMMC devices leading barebox-state to access
/dev/mmcblkXboot1 instead of /dev/mmcblkX.
Let's fix this regression by restoring the old behavior of preferring the
first disk. This may not be totally future proof, but it worked ok for
years and a better solution can always be added later with a regular
release.
Reported-by: Leonard Göhrs <l.goehrs@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Tested-by: Leonard Göhrs <lgo@pengutronix.de> [lxa,stm32mp157c-tac-gen1]
Tested-by: Roland Hieber <rhi@pengutronix.de> [riot,imx6s-riotboard]
Link: https://lore.pengutronix.de/oss-tools/20231106110405.3209233-1-a.fatoum@pengutronix.de
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Diffstat (limited to 'src/barebox-state/backend_bucket_circular.c')
0 files changed, 0 insertions, 0 deletions