diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-07 13:11:53 -0600 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-07-17 14:32:24 +0800 |
commit | 3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f (patch) | |
tree | 78e664ab09c487162a300f1add9b7a424271a7db /lib/acpi | |
parent | 83b2bd5a74a4a07a738ba039afc3028d8df2f97d (diff) | |
download | u-boot-3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f.tar.gz u-boot-3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f.tar.bz2 u-boot-3df33bda5c92a1a8b46b83ac9521fcf48a2fe50f.zip |
acpi: Support writing a string
ACPI supports storing a simple null-terminated string. Add support for
this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'lib/acpi')
-rw-r--r-- | lib/acpi/acpigen.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/acpi/acpigen.c b/lib/acpi/acpigen.c index 27d4eab7a6..b254ef6c9a 100644 --- a/lib/acpi/acpigen.c +++ b/lib/acpi/acpigen.c @@ -147,3 +147,9 @@ void acpigen_emit_string(struct acpi_ctx *ctx, const char *str) acpigen_emit_stream(ctx, str, str ? strlen(str) : 0); acpigen_emit_byte(ctx, '\0'); } + +void acpigen_write_string(struct acpi_ctx *ctx, const char *str) +{ + acpigen_emit_byte(ctx, STRING_PREFIX); + acpigen_emit_string(ctx, str); +} |