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>
This commit is contained in:
parent
55ab5ef393
commit
d942ed9aa5
|
@ -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') {
|
||||
|
|
Loading…
Reference in New Issue