[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] PATCH 2/4: implement getVersion method for openvz



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

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]