From 192be1dcaef48e4bba8d4b0e466203450e7799e2 Mon Sep 17 00:00:00 2001 From: Miodrag Dinic Date: Fri, 30 Sep 2016 13:48:27 +0200 Subject: [PATCH] [qemu]: Fix payload size format in qemu_pipe_frame_send() The following change introduced regression for booting AOSP on emulator for all architectures: 7c7990e Fix warnings in system/ headers qemu_pipe expects payload size in the message header to be in hex format, as stated in the comment for qemu_pipe_frame_send(). Change-Id: I32cfa9c9b2af56f93bbda0ea5597451c389ae45e Signed-off-by: Miodrag Dinic --- include/system/qemu_pipe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/system/qemu_pipe.h b/include/system/qemu_pipe.h index 40a5b503c..af2507997 100644 --- a/include/system/qemu_pipe.h +++ b/include/system/qemu_pipe.h @@ -85,7 +85,7 @@ static int __inline__ qemu_pipe_frame_send(int fd, const void* buff, size_t len) { char header[5]; - snprintf(header, sizeof(header), "%04zu", len); + snprintf(header, sizeof(header), "%04zx", len); ssize_t ret = TEMP_FAILURE_RETRY(write(fd, header, 4)); if (ret != 4) { QEMU_PIPE_DEBUG("Can't write qemud frame header: %s", strerror(errno));