On Fri, Jul 11, 2008 at 07:55:11PM +0400, Evgeniy Sokolov wrote:
> 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.

Apart from this, the rest of the patch looks good tome.


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to