mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Support VNC keymap option with QEMU (Daniel Hokka Zakrisson)
This commit is contained in:
parent
045d32a8e8
commit
f6ba6e9eb7
1
AUTHORS
1
AUTHORS
@ -39,6 +39,7 @@ Patches have also been contributed by:
|
||||
Jim Paris <jim@jtan.com>
|
||||
Chris Lalancette <clalance@redhat.com>
|
||||
Guido Guenther <agx@sigxcpu.org>
|
||||
Daniel Hokka Zakrisson <daniel@hozac.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -1,4 +1,9 @@
|
||||
Mon Jan 15 09:18:53 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
Tue Jan 15 10:01:53 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/qemu_conf.h, src/qemu_conf.c: Add support for 'keymap'
|
||||
parameter wrt to VNC servers (Daniel Hokka Zakrisson)
|
||||
|
||||
Tue Jan 15 09:18:53 EST 2008 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* src/remote_internal.c: Fix off by one in checking SSH
|
||||
argv for NULL. Fix format args in error message to avoid
|
||||
|
@ -218,6 +218,7 @@ void qemudFreeVMDef(struct qemud_vm_def *def) {
|
||||
input = input->next;
|
||||
free(prev);
|
||||
}
|
||||
xmlFree(def->keymap);
|
||||
free(def);
|
||||
}
|
||||
|
||||
@ -1245,6 +1246,7 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn,
|
||||
else
|
||||
strcpy(def->vncListen, driver->vncListen);
|
||||
def->vncListen[BR_INET_ADDR_MAXLEN-1] = '\0';
|
||||
def->keymap = (char *) xmlGetProp(obj->nodesetval->nodeTab[0], BAD_CAST "keymap");
|
||||
xmlFree(vncport);
|
||||
xmlFree(vnclisten);
|
||||
} else if (!strcmp((char *)prop, "sdl")) {
|
||||
@ -1807,6 +1809,12 @@ int qemudBuildCommandLine(virConnectPtr conn,
|
||||
goto no_memory;
|
||||
if (!((*argv)[++n] = strdup(vncdisplay)))
|
||||
goto no_memory;
|
||||
if (vm->def->keymap) {
|
||||
if (!((*argv)[++n] = strdup("-k")))
|
||||
goto no_memory;
|
||||
if (!((*argv)[++n] = strdup(vm->def->keymap)))
|
||||
goto no_memory;
|
||||
}
|
||||
} else if (vm->def->graphicsType == QEMUD_GRAPHICS_NONE) {
|
||||
/* Nada - we added -nographic earlier in this function */
|
||||
} else {
|
||||
@ -2918,6 +2926,11 @@ char *qemudGenerateXML(virConnectPtr conn,
|
||||
def->vncListen) < 0)
|
||||
goto no_memory;
|
||||
|
||||
if (def->keymap &&
|
||||
virBufferVSprintf(buf, " keymap='%s'",
|
||||
def->keymap) < 0)
|
||||
goto no_memory;
|
||||
|
||||
if (virBufferAdd(buf, "/>\n", -1) < 0)
|
||||
goto no_memory;
|
||||
break;
|
||||
|
@ -206,6 +206,7 @@ struct qemud_vm_def {
|
||||
int vncPort;
|
||||
int vncActivePort;
|
||||
char vncListen[BR_INET_ADDR_MAXLEN];
|
||||
char *keymap;
|
||||
|
||||
int ndisks;
|
||||
struct qemud_vm_disk_def *disks;
|
||||
|
Loading…
x
Reference in New Issue
Block a user