diff options
| author | Simon Glass <[email protected]> | 2025-05-02 08:46:32 -0600 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2025-05-30 09:49:32 +0100 |
| commit | 8636da86a2fb5f5f1a571f6cb3f12c0e8c207698 (patch) | |
| tree | 62a3cdcdff304ae9c294d199d85c16081cfafe72 /boot | |
| parent | 8aa384d01a079ec2d816f7051a7208a337727338 (diff) | |
expo: Use an abuf to hold strings
It is more convenient to put strings in an abuf so they can easily be
resized. Adjust the struct accordingly.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/expo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/expo.c b/boot/expo.c index 301bbfa5f9a..debdb60022b 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -86,7 +86,7 @@ int expo_str(struct expo *exp, const char *name, uint id, const char *str) return log_msg_ret("obj", -ENOMEM); estr->id = resolve_id(exp, id); - estr->str = str; + abuf_init_const(&estr->buf, str, strlen(str) + 1); list_add_tail(&estr->sibling, &exp->str_head); return estr->id; @@ -98,7 +98,7 @@ const char *expo_get_str(struct expo *exp, uint id) list_for_each_entry(estr, &exp->str_head, sibling) { if (estr->id == id) - return estr->str; + return estr->buf.data; } return NULL; |
