state: helpful error message if state GUID cannot be found
PATCH 1/1 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.
--- common/state/state.c | 1 + 1 file changed, 1 insertion(+)
common/state/state.c +1 -0
@@ -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; }
Signature · 1 line
2.47.3
Hello,
Quoted 8 lines · 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 <[email protected]>
Thanks,
Ahmad
Quoted 16 lines
--- common/state/state.c | 1 + 1 file changed, 1 insertion(+)common/state/state.c +1
-0@@ -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; }
Signature · 4 lines
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 |
Sascha Hauer
AppliedQuoted 8 lines · 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.
[...]
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,
Signature · 1 line
Sascha Hauer <[email protected]>