> 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.