Skip to content

Commit 20333bd

Browse files
ejoernssaschahauer
authored andcommitted
state: helpful error message if state GUID cannot be found
So far, if the user didn't specify a valid GPT UID, state initialization failed with the not so helpful error message: | ERROR: state state.of: probe failed: Invalid argument Improve this by also providing a helpful error message. Signed-off-by: Enrico Jörns <ejo@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20260113132444.3808198-1-ejo@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent b99251c commit 20333bd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

common/state/state.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
651651
if (cdev_is_block_disk(cdev)) {
652652
cdev = cdev_find_child_by_gpt_typeuuid(cdev, &barebox_state_partition_guid);
653653
if (IS_ERR(cdev)) {
654+
dev_err(&state->dev, "cannot find backend GPT partition by PartitionTypeGUID\n");
654655
ret = -EINVAL;
655656
goto out_release_state;
656657
}

0 commit comments

Comments
 (0)