summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-03-08 16:19:15 +0100
committerMichael S. Tsirkin <mst@redhat.com>2015-03-10 16:09:59 +0100
commitaea10cdef2fb5c3bb8af598609ce19f725bf127f (patch)
tree5d267128e8ef57feebcf508140e3102170768b14 /hw
parent7d433b0d85eba3d5083be6b74fd111f6de4ee373 (diff)
downloadqemu-aea10cdef2fb5c3bb8af598609ce19f725bf127f.tar.gz
qemu-aea10cdef2fb5c3bb8af598609ce19f725bf127f.tar.bz2
qemu-aea10cdef2fb5c3bb8af598609ce19f725bf127f.zip
aml-build: append opcodes using build_append_byte
Opcodes are raw bytes, they shouldn't be added using build_append_int. This only happens to work with 0 and 1 opcodes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/acpi/aml-build.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index ff12b28299..e01b8c24b0 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -112,7 +112,7 @@ build_append_namestringv(GArray *array, const char *format, va_list ap)
switch (seg_count) {
case 1:
if (!*s) {
- build_append_byte(array, 0x0); /* NullName */
+ build_append_byte(array, 0x00); /* NullName */
} else {
build_append_nameseg(array, s);
}
@@ -448,7 +448,7 @@ Aml *aml_and(Aml *arg1, Aml *arg2)
Aml *var = aml_opcode(0x7B /* AndOp */);
aml_append(var, arg1);
aml_append(var, arg2);
- build_append_int(var->buf, 0x00 /* NullNameOp */);
+ build_append_byte(var->buf, 0x00 /* NullNameOp */);
return var;
}
@@ -546,7 +546,7 @@ Aml *aml_equal(Aml *arg1, Aml *arg2)
Aml *var = aml_opcode(0x93 /* LequalOp */);
aml_append(var, arg1);
aml_append(var, arg2);
- build_append_int(var->buf, 0x00); /* NullNameOp */
+ build_append_byte(var->buf, 0x00); /* NullNameOp */
return var;
}