On Fri, Jun 28, 2024 at 11:27:06AM -0700, Gregor Haas wrote: > The read() syscall is not guaranteed to return all data from a file. The > default ROM loader implementation currently does not take this into account, > instead failing if all bytes are not read at once. This change loads the ROM > using g_file_get_contents() instead, which correctly reads all data using > multiple calls to read() while also returning the loaded ROM size. > > Signed-off-by: Gregor Haas <gregorhaas1...@gmail.com> > --- > hw/core/loader.c | 30 +++++------------------------- > 1 file changed, 5 insertions(+), 25 deletions(-)
Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|