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

Re: [Xen-devel] [PATCH 1/2] libxl, Introduce the command line handler for the new qemu.



On Wed, 2010-08-04 at 17:11 +0100, anthony.perard@xxxxxxxxxx wrote:
> +    // Search for the new version or the old version:
> +    // QEMU emulator version 0.12.50, ...
> +    // QEMU PC emulator version 0.10.2, ...
> +    if (strncmp("QEMU", buf, 4) == 0) {
> +        char *v = strstr(buf, "version ");
> +        if (v) {
> +            int major, minor;
> +            char *endptr = NULL;
> +
> +            v += strlen("version ");
> +            major = strtol(v, &endptr, 10);
> +            if (major == 0 && endptr && *endptr == '.') {
> +                v = endptr + 1;
> +                minor = strtol(v, &endptr, 10);
> +                if (minor >= 12)
> +                    return 1;
> +            }
> +            return 0;
> +        }
> +    }
> +    return 0;
> +}

I don't like it. The version number is not a clear indication of
parameters especially of patched versions. If you are going to do
anything like this then qemu-dm ought to print out QEMU-DM and handle it
like that.

As for mainstream qemu, I hear that a future version will contain some
capability querying functionality.

Gianni


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.