mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 13:17:58 +03:00
qemu: add virQEMUCapsSetVAList
And adjust virQEMUCapsSetList to use it. It will also be used in future patches. Reviewed-by: Andrea Bolognani <abologna@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
1db9d0efbf
commit
05be8d8b06
@ -1663,15 +1663,24 @@ virQEMUCapsSet(virQEMUCapsPtr qemuCaps,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
virQEMUCapsSetVAList(virQEMUCapsPtr qemuCaps,
|
||||
va_list list)
|
||||
{
|
||||
int flag;
|
||||
|
||||
while ((flag = va_arg(list, int)) < QEMU_CAPS_LAST)
|
||||
ignore_value(virBitmapSetBit(qemuCaps->flags, flag));
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
virQEMUCapsSetList(virQEMUCapsPtr qemuCaps, ...)
|
||||
{
|
||||
va_list list;
|
||||
int flag;
|
||||
|
||||
va_start(list, qemuCaps);
|
||||
while ((flag = va_arg(list, int)) < QEMU_CAPS_LAST)
|
||||
ignore_value(virBitmapSetBit(qemuCaps->flags, flag));
|
||||
virQEMUCapsSetVAList(qemuCaps, list);
|
||||
va_end(list);
|
||||
}
|
||||
|
||||
|
@ -518,6 +518,8 @@ virQEMUCapsPtr virQEMUCapsNew(void);
|
||||
void virQEMUCapsSet(virQEMUCapsPtr qemuCaps,
|
||||
virQEMUCapsFlags flag) ATTRIBUTE_NONNULL(1);
|
||||
|
||||
void virQEMUCapsSetVAList(virQEMUCapsPtr qemuCaps,
|
||||
va_list list) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
|
||||
void virQEMUCapsSetList(virQEMUCapsPtr qemuCaps, ...) ATTRIBUTE_NONNULL(1);
|
||||
|
||||
void virQEMUCapsClear(virQEMUCapsPtr qemuCaps,
|
||||
|
Loading…
Reference in New Issue
Block a user