* [PATCH] state: helpful error message if state GUID cannot be found
@ 2026-01-13 13:24 Enrico Jörns
2026-01-13 13:27 ` Ahmad Fatoum
2026-01-13 14:14 ` Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Enrico Jörns @ 2026-01-13 13:24 UTC (permalink / raw)
To: barebox; +Cc: Enrico Jörns
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>
---
common/state/state.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/common/state/state.c b/common/state/state.c
index ac6cd6e572..1c23ad4c80 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -649,6 +649,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
if (cdev_is_block_disk(cdev)) {
cdev = cdev_find_child_by_gpt_typeuuid(cdev, &barebox_state_partition_guid);
if (IS_ERR(cdev)) {
+ dev_err(&state->dev, "cannot find backend GPT partition by PartitionTypeGUID\n");
ret = -EINVAL;
goto out_release_state;
}
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] state: helpful error message if state GUID cannot be found
2026-01-13 13:24 [PATCH] state: helpful error message if state GUID cannot be found Enrico Jörns
@ 2026-01-13 13:27 ` Ahmad Fatoum
2026-01-13 14:14 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Ahmad Fatoum @ 2026-01-13 13:27 UTC (permalink / raw)
To: Enrico Jörns, barebox
Hello,
On 1/13/26 2:24 PM, Enrico Jörns wrote:
> 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>
Thanks,
Ahmad
> ---
> common/state/state.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/common/state/state.c b/common/state/state.c
> index ac6cd6e572..1c23ad4c80 100644
> --- a/common/state/state.c
> +++ b/common/state/state.c
> @@ -649,6 +649,7 @@ struct state *state_new_from_node(struct device_node *node, bool readonly)
> if (cdev_is_block_disk(cdev)) {
> cdev = cdev_find_child_by_gpt_typeuuid(cdev, &barebox_state_partition_guid);
> if (IS_ERR(cdev)) {
> + dev_err(&state->dev, "cannot find backend GPT partition by PartitionTypeGUID\n");
> ret = -EINVAL;
> goto out_release_state;
> }
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] state: helpful error message if state GUID cannot be found
2026-01-13 13:24 [PATCH] state: helpful error message if state GUID cannot be found Enrico Jörns
2026-01-13 13:27 ` Ahmad Fatoum
@ 2026-01-13 14:14 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-01-13 14:14 UTC (permalink / raw)
To: barebox, Enrico Jörns
On Tue, 13 Jan 2026 14:24:25 +0100, Enrico Jörns wrote:
> 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.
>
> [...]
Applied, thanks!
[1/1] state: helpful error message if state GUID cannot be found
https://git.pengutronix.de/cgit/barebox/commit/?id=20333bd90ce3 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-13 14:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-13 13:24 [PATCH] state: helpful error message if state GUID cannot be found Enrico Jörns
2026-01-13 13:27 ` Ahmad Fatoum
2026-01-13 14:14 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox