acpi: build_append_nameseg(): add padding if necessary
commit6d848641b7a4da92840fb2f5c240d1668f5a9281
authorIgor Mammedov <imammedo@redhat.com>
Fri, 19 Dec 2014 11:47:00 +0000 (19 11:47 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 27 Jan 2015 12:46:17 +0000 (27 14:46 +0200)
treece345d393326dc06dd492704311356a7cadb490c
parente909c16d924c0dbb852de3c0dd3d9cb5213b90c5
acpi: build_append_nameseg(): add padding if necessary

According to ACPI spec NameSeg shorter than 4 characters
must be padded up to 4 characters with "_" symbol.
ACPI 5.0:  20.2.2 "Name Objects Encoding"

Do it in build_append_nameseg() so that caller shouldn't know
or care about it.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/acpi-build.c