Check the return value of get_image_size() and report failures
for non-mandatory file such as FRU image.
- Use ret < 0 to detect failures in getting image size.
- No functional changes.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/413
Signed-off-by: Trieu Huynh <vikingtc4@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-ID: <
20260318141415.8538-3-vikingtc4@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
g_free(fru->data);
fru->data = NULL;
}
+ } else {
+ error_report("Could not get file size '%s'", fru->filename);
}
out: