# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1225319502 25200
# Node ID 793cbc81633c57f75a26766a3add3969c7ecc32e
# Parent 087bd497d4ed6fbf1b2a00dac26a7c6f8baf91e2
Add count field to dominfo. Add keymap support for graphics devices.
Not really needed, but allows VSMS to treat this device in the same manner the
other devices are treated.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 087bd497d4ed -r 793cbc81633c libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Tue Nov 18 09:37:05 2008 -0800
+++ b/libxkutil/device_parsing.c Wed Oct 29 15:31:42 2008 -0700
@@ -926,8 +926,9 @@
goto err;
parse_devices(xml, &(*dominfo)->dev_emu, CIM_RES_TYPE_EMU);
- parse_devices(xml, &(*dominfo)->dev_graphics, CIM_RES_TYPE_GRAPHICS);
-
+ (*dominfo)->dev_graphics_ct = parse_devices(xml,
+ &(*dominfo)->dev_graphics,
+ CIM_RES_TYPE_GRAPHICS);
(*dominfo)->dev_input_ct = parse_devices(xml,
&(*dominfo)->dev_input,
CIM_RES_TYPE_INPUT);
@@ -1000,6 +1001,7 @@
cleanup_virt_devices(&dom->dev_net, dom->dev_net_ct);
cleanup_virt_devices(&dom->dev_disk, dom->dev_disk_ct);
cleanup_virt_devices(&dom->dev_vcpu, dom->dev_vcpu_ct);
+ cleanup_virt_devices(&dom->dev_graphics, dom->dev_graphics_ct);
cleanup_virt_devices(&dom->dev_input, dom->dev_input_ct);
free(dom);
diff -r 087bd497d4ed -r 793cbc81633c libxkutil/device_parsing.h
--- a/libxkutil/device_parsing.h Tue Nov 18 09:37:05 2008 -0800
+++ b/libxkutil/device_parsing.h Wed Oct 29 15:31:42 2008 -0700
@@ -125,6 +125,8 @@
int on_crash;
struct virt_device *dev_graphics;
+ int dev_graphics_ct;
+
struct virt_device *dev_emu;
struct virt_device *dev_input;
diff -r 087bd497d4ed -r 793cbc81633c libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Tue Nov 18 09:37:05 2008 -0800
+++ b/libxkutil/xmlgen.c Wed Oct 29 15:31:42 2008 -0700
@@ -703,7 +703,7 @@
if (dominfo->dev_graphics)
concat_devxml(&devxml,
dominfo->dev_graphics,
- 1,
+ dominfo->dev_graphics_ct,
graphics_to_xml);
console_xml(dominfo, &devxml);
diff -r 087bd497d4ed -r 793cbc81633c src/Virt_RASD.c
--- a/src/Virt_RASD.c Tue Nov 18 09:37:05 2008 -0800
+++ b/src/Virt_RASD.c Wed Oct 29 15:31:42 2008 -0700
@@ -279,6 +279,9 @@
}
CMSetProperty(inst, "Address", (CMPIValue *)addr_str, CMPI_chars);
+ CMSetProperty(inst, "ResourceSubType",
+ (CMPIValue *)dev->dev.graphics.keymap, CMPI_chars);
+
out:
free(addr_str);
diff -r 087bd497d4ed -r 793cbc81633c src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Tue Nov 18 09:37:05 2008 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Wed Oct 29 15:31:42 2008 -0700
@@ -718,6 +718,7 @@
{
const char *id;
const char *addr;
+ const char *keymap;
CMPIInstance *inst;
CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -747,6 +748,9 @@
addr = "127.0.0.1:-1";
CMSetProperty(inst, "Address", (CMPIValue *)addr, CMPI_chars);
+
+ keymap = "en-us";
+ CMSetProperty(inst, "ResourceSubType", (CMPIValue *)keymap,
CMPI_chars);
inst_list_add(list, inst);