|
From: | Paolo Bonzini |
Subject: | Re: [PATCH v2 2/2] pci: add romsize property |
Date: | Fri, 29 Jan 2021 21:16:39 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 29/01/21 21:06, BALATON Zoltan wrote:
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?
There is probably some warning for it but I think not even -Wextra enables it by default.
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |