[libvirt] [PATCH] vz: allow only en-us keymap for VNC

Mikhail Feoktistov mfeoktistov at virtuozzo.com
Wed Nov 18 15:19:07 UTC 2015


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 | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 89c9e89..526c0f2 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -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;
     }
 
-- 
1.8.3.1




More information about the libvir-list mailing list