Re: [RFC v3] Export KVM Host Power Management capabilities

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

 



On 08/08/2011 10:18 AM, Eric Blake wrote:

Correction on my bitmask idea:

+ if(caps->host.isPMQuerySuccess) {

if (caps->host.powerMgmt) {
unsigned int pm = caps->host.powerMgmt;
virBufferAddLit(&xml, "<power_management>\n");
while (pm) {
int bit = ffs(pm) - 1;
virBufferAsprintf(&xml, "<%s/>\n",
virHostPMCapabilityTypeToString(bit);
pm &= ~bit;

pm &= ~(1U << bit);

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]