[libvirt] [PATCH] Convert qemu command line flags to 64-bit int

Matthias Bolte matthias.bolte at googlemail.com
Wed Feb 10 10:45:45 UTC 2010


2010/2/10 Daniel Veillard <veillard at redhat.com>:
> On Tue, Feb 09, 2010 at 07:04:24PM +0000, Daniel P. Berrange wrote:
>> The QEMU flags are commonly stored as a signed or unsigned int,
>> allowing only 31 flags. This limit is rather close, so to aid
>> future patches, change it to a 64-bit int
>>
>> * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c,
>>   tests/qemuargv2xmltest.c, tests/qemuhelptest.c, tests/qemuxml2argvtest.c:
>>   Use 'unsigned long long' for QEMU flags
>> ---

>
>  ACK, that was something I was about to look at :-)
> hopefully the enum definition for the flags will allow to go over
> 32 bits too, I think the patch should also change all the
> QEMUD_CMD_FLAG_ in /src/qemu/qemu_conf.h to be redefined from
> (1 << x) into (1UUL << x),
>
> Daniel
>

I missed the fact that the flags are defined as enum members. This
maybe an issue. IIRC enum members are ints. We should test this to
make sure it works as expected on 32bit and 64bit systems.

Matthias




More information about the libvir-list mailing list