[libvirt] [PATCH v4 08/14] qemu: Generate cmd line at startup

Michal Privoznik mprivozn at redhat.com
Wed Apr 18 15:06:33 UTC 2018


On 04/16/2018 04:56 PM, Michal Privoznik wrote:
> On 04/14/2018 03:04 PM, John Ferlan wrote:
>>
>>
>> On 04/10/2018 10:58 AM, Michal Privoznik wrote:
>>> This is the easier part. All we need to do here is put -object
>>> pr-manager-helper,id=$alias,path=$socketPath and then just
>>> reference the object in -drive file.pr-manager=$alias.
>>>
>>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>>> ---
>>>  src/qemu/qemu_command.c                            | 94 ++++++++++++++++++++++
>>>  src/qemu/qemu_command.h                            |  3 +
>>>  .../disk-virtio-scsi-reservations.args             | 35 ++++++++
>>>  tests/qemuxml2argvtest.c                           |  4 +
>>>  4 files changed, 136 insertions(+)
>>>  create mode 100644 tests/qemuxml2argvdata/disk-virtio-scsi-reservations.args

So just to give everybody an idea what is this patch going to look like,
I'm attaching it here. I'd like to ask if this is really way we want to
go. Frankly, I find the patch ugly, because in order to not strdup() a
static string, I have to differentiate every time I need an alias. Just
look at qemuBuildDriveSourcePR(). I hate it so much, that I made
qemuBuildPRManagerInfoProps() to stdup() the string. Just think how it
would look like if I did no such thing.

Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-generate-cmd-line.patch
Type: text/x-patch
Size: 12960 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180418/a645c0f7/attachment-0001.bin>


More information about the libvir-list mailing list