On Fri, 29 Jan 2021, Paolo Bonzini wrote:
On 29/01/21 20:51, BALATON Zoltan wrote:
otherwise the BIOS emulator in the guest firmware crashes and this works so I think romfile can be empty and it's a useful feature to have in this case for example. I don't know if this patch changes anything about that but the commit message saying that romfile cannot be empty may be wrong.

The empty property value configures the device not to have a ROM file at all. The commit message says that ROM files (if they exist) cannot be empty, corresponding to this code in pci_add_option_rom:

   } else if (size == 0) {
       error_setg(errp, "romfile \"%s\" is empty", pdev->romfile);
       g_free(path);
       return;
   }

OK, then it was just not clear to me that the commit message talks about the romfile itself and not the property.

By the way, does it make sense to compare uint32_t value to -1 and could that provoke some compiler/sanitiser warnings? Is it better to have a signed type or use UINT32_MAX or simlar instead?

Regards,
BALATON Zoltan

Reply via email to