On Mon, Oct 20, 2008 at 11:33:20AM +0200, Daniel Veillard wrote:
On Tue, Oct 14, 2008 at 04:19:06PM +0100, Daniel P. Berrange wrote:
> This patch implements the getVersion driver method for openvz to report
> the version number of vzctl. This is needed in the next patch to determine
> if we have builtin support for bridges
Looks fine except:
> +static int
> +openvzExtractVersionInfo(const char *cmd, int *retversion)
> +{
[...]
> + enum { MAX_HELP_OUTPUT_SIZE = 8192 };
> + int len = virFileReadLimFD(newstdout, MAX_HELP_OUTPUT_SIZE, &help);
Except that part which puzzles me. Why defining an enum for that. Also
enum is one of the worse part of C, it has no clear storage size
definition, and virFileReadLimFD takes an input int anyway...
There's no particular reason for this - I just copied the equivalent
code in the QEMU driver for extracting version info & this was the
way it worked. This constant is only used once, so its not really
doing much of use.
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 :|