mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 15:15:46 +00:00
ui/dbus: add p2p=on/off option
Add an option to use direct connections instead of via the bus. Clients are accepted with QMP add_client. This allows to provide the D-Bus display without a bus. It also simplifies the testing setup (some CI have issues to setup a D-Bus bus in a container). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
@ -24,6 +24,7 @@
|
||||
#include "chardev/char.h"
|
||||
#include "ui/qemu-spice.h"
|
||||
#include "ui/console.h"
|
||||
#include "ui/dbus-display.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "sysemu/runstate.h"
|
||||
#include "sysemu/runstate-action.h"
|
||||
@ -285,6 +286,18 @@ void qmp_add_client(const char *protocol, const char *fdname,
|
||||
skipauth = has_skipauth ? skipauth : false;
|
||||
vnc_display_add_client(NULL, fd, skipauth);
|
||||
return;
|
||||
#endif
|
||||
#ifdef CONFIG_DBUS_DISPLAY
|
||||
} else if (strcmp(protocol, "@dbus-display") == 0) {
|
||||
if (!qemu_using_dbus_display(errp)) {
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
if (!qemu_dbus_display.add_client(fd, errp)) {
|
||||
close(fd);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
#endif
|
||||
} else if ((s = qemu_chr_find(protocol)) != NULL) {
|
||||
if (qemu_chr_add_client(s, fd) < 0) {
|
||||
|
Reference in New Issue
Block a user