From: Alistair Francis Date: Thu, 30 Oct 2025 01:53:04 +0000 (+1000) Subject: hw/core/loader: Fixup whitespace for get_image_size() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=044bc505b10cefb5356fe46ac6ba176146f6e6f9;p=thirdparty%2Fqemu.git hw/core/loader: Fixup whitespace for get_image_size() Signed-off-by: Alistair Francis Reviewed-by:Vishal Chourasia Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20251030015306.2279148-1-alistair.francis@wdc.com> Signed-off-by: Alistair Francis --- diff --git a/hw/core/loader.c b/hw/core/loader.c index 8252616fdd..b7638ccd72 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -75,14 +75,20 @@ int64_t get_image_size(const char *filename, Error **errp) { int fd; int64_t size; + fd = qemu_open(filename, O_RDONLY | O_BINARY, errp); - if (fd < 0) + + if (fd < 0) { return -1; + } + size = lseek(fd, 0, SEEK_END); + if (size < 0) { error_setg_errno(errp, errno, "lseek failure: %s", filename); return -1; } + close(fd); return size; }