]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
vz: allow only en-us keymap for VNC
authorMikhail Feoktistov <mfeoktistov@virtuozzo.com>
Wed, 18 Nov 2015 15:19:07 +0000 (18:19 +0300)
committerDmitry Guryanov <dguryanov@parallels.com>
Thu, 19 Nov 2015 12:53:07 +0000 (15:53 +0300)
In virtuozzo we support only en-us keymap for VMs and containers.
If keymap is specified than check that it's en-us, otherwise
show error message.

src/vz/vz_sdk.c

index 89c9e89c7d92087f90d5ac5dcbd476145a721cdd..526c0f234b4c253a46918552e48e9f88208ad313 100644 (file)
@@ -2220,10 +2220,11 @@ static int prlsdkCheckGraphicsUnsupportedParams(virDomainDefPtr def)
         return -1;
     }
 
-    if (gr->data.vnc.keymap != 0) {
+    if (gr->data.vnc.keymap != 0 &&
+        STRNEQ(gr->data.vnc.keymap, "en-us")) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                       _("vz driver doesn't support "
-                         "keymap setting for VNC graphics."));
+                       _("vz driver supports only "
+                         "\"en-us\" keymap for VNC graphics."));
         return -1;
     }