Stefan Hajnoczi <stefa...@gmail.com> writes: > On Fri, Nov 23, 2012 at 07:12:17PM +0100, Markus Armbruster wrote: >> diff --git a/hw/pc_sysfw.c b/hw/pc_sysfw.c >> index 9d7c5f4..066c4fe 100644 >> --- a/hw/pc_sysfw.c >> +++ b/hw/pc_sysfw.c >> @@ -84,6 +84,11 @@ static void pc_fw_add_pflash_drv(void) >> bios_name = BIOS_FILENAME; >> } >> filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); >> + if (!filename) { >> + error_report("Can't open BIOS image %s: %s", >> + bios_name, strerror(errno)); > > qemu_find_file() does not document that errno is set when returning > NULL. I can't find other callers to qemu_find_file() that use errno > either. > > Please add a doc comment to qemu_find_file() that errno will be set on > NULL return, otherwise we can't rely on it in the caller.
Good point, v2 coming.