Skip to content
Snippets Groups Projects
Commit 1e8989ad authored by Simon Glass's avatar Simon Glass Committed by Bin Meng
Browse files

smbios: Use a struct to keep track of context


At present we pass the ofnode to each function. We also pass the 'eos'
pointer for adding new strings. We don't track the current end of the
string table, so have smbios_string_table_len() to find that.

The code can be made more efficient if it keeps information in a
context struct. This also makes it easier to add more features.

As a first step, switch the ofnode parameter to be a context pointer.
Update smbios_add_prop() at the same time to avoid changing the same
lines of code in consecutive patches.

Signed-off-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
parent 7617f996
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment