[libvirt] [PATCH] cleanup functions which exec OpenVZ tools

Evgeniy Sokolov evg at openvz.org
Mon Jul 14 12:04:01 UTC 2008


>> Patch improve code which execute external OpenVZ tools.
> 
>> +/* generate arguments to create OpenVZ container
>> +   return -1 - error
>> +           0 - OK
>> +*/
>> +static int openvzDomainDefineCmd(const char *args[], int maxarg, struct openvz_vm_def *vmdef)
> 
> Rather than passing in the pre-allocated args array of a fixed length,
> grab the 'ADD_ARG' and 'ADD_ARG_LIT' macros  from the qemu_conf.c
> file in the qemudBuildCommandLine() method. They let you easily
> dynamically grow the argv as required, without complicating the
> code significantly.

I thought about it, but I planned to add in one of next patches.

Thanks for review!

fixed patch is attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-openvz-cleanup_exec.diff
Type: text/x-patch
Size: 15192 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080714/88b30d59/attachment-0001.bin>


More information about the libvir-list mailing list