提交 b7abb791 编写于 作者: P Peter Maydell

hw/smbios/smbios.c: Don't use load_image()

The load_image() function is deprecated, as it does not let the
caller specify how large the buffer to read the file into is.
Instead use load_image_size().
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Reviewed-by: NRichard Henderson <richard.henderson@linaro.org>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Message-id: 20181130151712.2312-4-peter.maydell@linaro.org
上级 214b63cd
......@@ -982,7 +982,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
header = (struct smbios_structure_header *)(smbios_tables +
smbios_tables_len);
if (load_image(val, (uint8_t *)header) != size) {
if (load_image_size(val, (uint8_t *)header, size) != size) {
error_setg(errp, "Failed to load SMBIOS file %s", val);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册