diff options
| author | Simon Glass <[email protected]> | 2024-11-15 16:19:12 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-01-15 08:48:42 -0600 |
| commit | 49867e804543f64ca216653c3905d8022c31fc84 (patch) | |
| tree | 8588bae07829c92ab693f0c1198ff4ccdc5afe39 /cmd | |
| parent | 6a3eb84b18333eb4beb7e660fa9ae8ccff07b0c4 (diff) | |
bootstd: Move the bootflow list into an alist
Use an alist for this data structure as it is somewhat simpler to
manage. This means that bootstd holds a simple list of bootflow structs
and can drop it at will, without chasing down lists.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/bootdev.c | 2 | ||||
| -rw-r--r-- | cmd/bootflow.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootdev.c b/cmd/bootdev.c index fa7285ba25e..4bc229e809a 100644 --- a/cmd/bootdev.c +++ b/cmd/bootdev.c @@ -81,7 +81,7 @@ static int do_bootdev_info(struct cmd_tbl *cmdtp, int flag, int argc, dev = priv->cur_bootdev; - /* Count the number of bootflows, including how many are valid*/ + /* Count the number of bootflows, including how many are valid */ num_valid = 0; for (ret = bootdev_first_bootflow(dev, &bflow), i = 0; !ret; diff --git a/cmd/bootflow.c b/cmd/bootflow.c index 1c1146ce11e..f88995a478f 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -208,7 +208,7 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc, if (!ret) num_valid++; ret = bootstd_add_bootflow(&bflow); - if (ret) { + if (ret < 0) { printf("Out of memory\n"); return CMD_RET_FAILURE; } |
