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 <sjg@chromium.org>
diff --git a/boot/expo.c b/boot/expo.c
index 301bbfa..debdb60 100644
--- a/boot/expo.c
+++ b/boot/expo.c
@@ -86,7 +86,7 @@
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 @@
list_for_each_entry(estr, &exp->str_head, sibling) {
if (estr->id == id)
- return estr->str;
+ return estr->buf.data;
}
return NULL;