Hi
On 08/01/2016 11:29 PM, Amit Shah wrote:
On (Mon) 01 Aug 2016 [10:16:50], Paolo Bonzini wrote:
@@ -1370,7 +1370,7 @@ static const VMStateDescription vmstate_mptsas = {
.post_load = mptsas_post_load,
.fields = (VMStateField[]) {
VMSTATE_PCI_DEVICE(dev, MPTSASState),
-
+ VMSTATE_UNUSED(sizeof(bool)), /* Was msi_in_use */
This needs to be "1", not sizeof(bool), because vmstate_info_bool writes
a single byte. I'll fix this and queue the patch (removing Amit's
reviewed-by since it's effectively a different change).
Eeks, yes.
This patch was merged in the meantime, so Cao Jin, please post a
revert and a fix, thanks!
Amit
Before I send the fix, I did a quick test on linux as following:
#include <stdio.h>
#include <stdbool.h>
int main()
{
printf("bool size = %d\n", sizeof(bool));
}
then:
./a.out
bool size = 1
and there is mptsas.c #include "qemu/osdep.h", osdep.h #include <stdbool.h>
So, am I missing something?
--
Yours Sincerely,
Cao jin