[Libvirt-cim] [PATCH 1 of 3] Add count field to dominfo. Add keymap support for graphics devices
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Nov 19 18:32:58 UTC 2008
Dan Smith wrote:
> 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.
I struggled with which attribute to use to store the keymap info. When
calling DefineSystem(), the user might want to specify a certain keymapping.
I could extend the current GraphicsRASD schema to include a KeyMapping
attribute or something similar.
I considered using the caption attribute, but that doesn't seem
appropriate either.
>
> 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.
>
Sure - I'll change this on the next revision.
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin at linux.vnet.ibm.com
More information about the Libvirt-cim
mailing list