diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-08-30 20:44:37 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-09-02 22:35:14 +0200 |
commit | d942ed9aa5bb034c2664d27d09ff7b32ed91fb53 (patch) | |
tree | e712e3e56773e36a4a8b4f917cdccd77ebd56a79 /src/arch/x86/boot | |
parent | 55ab5ef393c727afaae1e971ae0d7cbff6471203 (diff) |
acpigen: Correctly handle root scope
Change-Id: I9b3c9109b01e348259e64e93a4397212216ab152
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/6799
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/arch/x86/boot')
-rw-r--r-- | src/arch/x86/boot/acpigen.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/x86/boot/acpigen.c b/src/arch/x86/boot/acpigen.c index ba3d2dfe46..222a2db284 100644 --- a/src/arch/x86/boot/acpigen.c +++ b/src/arch/x86/boot/acpigen.c @@ -223,7 +223,12 @@ int acpigen_emit_namestring(const char *namepath) { namepath++; } - ASSERT(namepath[0] != '\0'); + /* If we have only \\ or only ^...^. Then we need to put a null + name (0x00). */ + if(namepath[0] == '\0') { + len += acpigen_emit_byte(0x00); + return len; + } i = 0; while (namepath[i] != '\0') { |