Revision cdae5cfb

b/hw/hw.h
333 333
    const VMStateSubsection *subsections;
334 334
};
335 335

  
336
extern const VMStateInfo vmstate_info_bool;
337

  
336 338
extern const VMStateInfo vmstate_info_int8;
337 339
extern const VMStateInfo vmstate_info_int16;
338 340
extern const VMStateInfo vmstate_info_int32;
......
602 604
#define VMSTATE_STRUCT_POINTER(_field, _state, _vmsd, _type)          \
603 605
    VMSTATE_STRUCT_POINTER_TEST(_field, _state, NULL, _vmsd, _type)
604 606

  
607
#define VMSTATE_BOOL_V(_f, _s, _v)                                    \
608
    VMSTATE_SINGLE(_f, _s, _v, vmstate_info_bool, bool)
609

  
605 610
#define VMSTATE_INT8_V(_f, _s, _v)                                    \
606 611
    VMSTATE_SINGLE(_f, _s, _v, vmstate_info_int8, int8_t)
607 612
#define VMSTATE_INT16_V(_f, _s, _v)                                   \
......
620 625
#define VMSTATE_UINT64_V(_f, _s, _v)                                  \
621 626
    VMSTATE_SINGLE(_f, _s, _v, vmstate_info_uint64, uint64_t)
622 627

  
628
#define VMSTATE_BOOL(_f, _s)                                          \
629
    VMSTATE_BOOL_V(_f, _s, 0)
630

  
623 631
#define VMSTATE_INT8(_f, _s)                                          \
624 632
    VMSTATE_INT8_V(_f, _s, 0)
625 633
#define VMSTATE_INT16(_f, _s)                                         \
......
674 682
#define VMSTATE_PTIMER(_f, _s)                                        \
675 683
    VMSTATE_PTIMER_V(_f, _s, 0)
676 684

  
685
#define VMSTATE_BOOL_ARRAY_V(_f, _s, _n, _v)                         \
686
    VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_bool, bool)
687

  
688
#define VMSTATE_BOOL_ARRAY(_f, _s, _n)                               \
689
    VMSTATE_BOOL_ARRAY_V(_f, _s, _n, 0)
690

  
677 691
#define VMSTATE_UINT16_ARRAY_V(_f, _s, _n, _v)                         \
678 692
    VMSTATE_ARRAY(_f, _s, _n, _v, vmstate_info_uint16, uint16_t)
679 693

  
b/savevm.c
675 675
    return v;
676 676
}
677 677

  
678
/* bool */
679

  
680
static int get_bool(QEMUFile *f, void *pv, size_t size)
681
{
682
    bool *v = pv;
683
    *v = qemu_get_byte(f);
684
    return 0;
685
}
686

  
687
static void put_bool(QEMUFile *f, void *pv, size_t size)
688
{
689
    bool *v = pv;
690
    qemu_put_byte(f, *v);
691
}
692

  
693
const VMStateInfo vmstate_info_bool = {
694
    .name = "bool",
695
    .get  = get_bool,
696
    .put  = put_bool,
697
};
698

  
678 699
/* 8 bit int */
679 700

  
680 701
static int get_int8(QEMUFile *f, void *pv, size_t size)

Also available in: Unified diff