
12 Mar
2022
12 Mar
'22
3:24 a.m.
Hi Ilias,
On Wed, 27 Oct 2021 at 01:37, Ilias Apalodimas ilias.apalodimas@linaro.org wrote:
Hi Simon,
[...]
+/* error codes used to signal running out of things */ +enum {
BF_NO_MORE_PARTS = -ESHUTDOWN,
BF_NO_MORE_DEVICES = -ENODEV,
+};
+static const char *const bootflow_state[BOOTFLOWST_COUNT] = {
"base",
"media",
"part",
"fs",
"file",
"ready",
I can understand 'ready' as a boot state. What are the rest supposed to be ?
These are documented in the header file.
+};
+const char *bootflow_state_get_name(enum bootflow_state_t state) +{
if (state < 0 || state >= BOOTFLOWST_COUNT)
return "?";
s/?/Unknown/ or invalid maybe?
This is an invalid state so should not happen. Tom is pushing for the minimum possible code size so it doesn't seem worth putting a user-friendly error for a case that can't happen.
return bootflow_state[state];
+}
+int bootflow_first_glob(struct bootflow **bflowp) +{
struct bootstd_priv *std;
[...]
Regards /Ilias