1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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>
This commit is contained in:
Simon Glass
2020-07-07 13:11:53 -06:00
committed by Bin Meng
parent 83b2bd5a74
commit 3df33bda5c
3 changed files with 44 additions and 0 deletions

View File

@@ -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);
}