summary refs log tree commit diff stats
path: root/linux-user/arm/cpu_loop.c
diff options
context:
space:
mode:
authorSam Li <faithilikerun@gmail.com>2023-07-27 19:58:44 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2023-07-27 09:46:09 -0400
commit29a242e165610df9b158bdb8d6b84e83d8733fc4 (patch)
tree1dd81f35bad280d11b7f43445919343c21b8ea79 /linux-user/arm/cpu_loop.c
parenta5942c177b7bcc1357e496b7d68668befcfc2bb9 (diff)
downloadfocaccia-qemu-29a242e165610df9b158bdb8d6b84e83d8733fc4.tar.gz
focaccia-qemu-29a242e165610df9b158bdb8d6b84e83d8733fc4.zip
block/file-posix: fix g_file_get_contents return path
The g_file_get_contents() function returns a g_boolean. If it fails, the
returned value will be 0 instead of -1. Solve the issue by skipping
assigning ret value.

This issue was found by Matthew Rosato using virtio-blk-{pci,ccw} backed
by an NVMe partition e.g. /dev/nvme0n1p1 on s390x.

Signed-off-by: Sam Li <faithilikerun@gmail.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-id: 20230727115844.8480-1-faithilikerun@gmail.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'linux-user/arm/cpu_loop.c')
0 files changed, 0 insertions, 0 deletions