[Libvirt-cim] [PATCH 1 of 3] Add count field to dominfo. Add keymap support for graphics devices

Dan Smith danms at us.ibm.com
Wed Nov 19 18:27:10 UTC 2008


KR> diff -r 087bd497d4ed -r 793cbc81633c src/Virt_RASD.c
KR> --- a/src/Virt_RASD.c	Tue Nov 18 09:37:05 2008 -0800
KR> +++ b/src/Virt_RASD.c	Wed Oct 29 15:31:42 2008 -0700
KR> @@ -279,6 +279,9 @@
KR>          }

KR>          CMSetProperty(inst, "Address", (CMPIValue *)addr_str, CMPI_chars);
KR> +        CMSetProperty(inst, "ResourceSubType", 
KR> +                      (CMPIValue *)dev->dev.graphics.keymap, CMPI_chars);
KR> +

Hmm, it doesn't seem right to me to say that "en-us" further refines
the graphics device to a more specific type.  I would think that
ResourceSubType here might be "Virtual Console" or "VNC Graphics
Adapter" or some such.  The keymap, while associated to the graphics
device in the libvirt XML, isn't a scoping property IMHO.

KR> @@ -747,6 +748,9 @@

KR>          addr = "127.0.0.1:-1";
KR>          CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars);
KR> +
KR> +        keymap = "en-us";
KR> +        CMSetProperty(inst, "ResourceSubType", (CMPIValue *)keymap, CMPI_chars);


I think you can get away with not declaring a new variable for this.
You can pass the string constant directly to the CMSetProperty() call.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com




More information about the Libvirt-cim mailing list