[Libvirt-cim] [PATCH] Catch unimplemented sentinel of GetMaxVcpus and be less stupid

Jim Fehlig jfehlig at novell.com
Tue Dec 2 22:21:11 UTC 2008


Dan Smith wrote:
> # HG changeset patch
> # User Dan Smith <danms at us.ibm.com>
> # Date 1228245240 28800
> # Node ID 03af2846604b1fdc8d1d7fa3aef737f727b0414b
> # Parent  c9a0e8c2f4e85f9bbdbe1857ac5689e8a8efc909
> Catch unimplemented sentinel of GetMaxVcpus and be less stupid
>
> Currently, we stuff the result of GetMaxVcpus into a u64 directly.  Since
> that function can return -1 for unimplemented (as it does for LXC), we end
> up with a ridiculously large number of vcpus as the maximum.
>
> Assuming nothing can run with less than 1 cpu, I think it's a safe default
> for this case.
>   

Makes sense and looks sane :-).

Jim




More information about the Libvirt-cim mailing list