mirror of https://gitee.com/openkylin/qemu.git
Revert "Introduce a default qmp session"
This reverts commit 3290c4aac5
.
Conflicts:
vl.c
This commit is contained in:
parent
2d114dc16f
commit
5ec9cc64a4
63
vl.c
63
vl.c
|
@ -93,10 +93,6 @@ extern int madvise(caddr_t, size_t, int);
|
||||||
#include <libvdeplug.h>
|
#include <libvdeplug.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_UUID)
|
|
||||||
#include <uuid/uuid.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -3708,62 +3704,6 @@ static const QEMUOption *lookup_opt(int argc, char **argv,
|
||||||
return popt;
|
return popt;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void qmp_add_default(void)
|
|
||||||
{
|
|
||||||
char buffer[4096];
|
|
||||||
const char *home;
|
|
||||||
static uint8_t null_uuid[16];
|
|
||||||
uint8_t uuid[16];
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
home = getenv("HOME");
|
|
||||||
if (!home) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (memcmp(qemu_uuid, null_uuid, sizeof(null_uuid)) == 0) {
|
|
||||||
#if defined(CONFIG_UUID)
|
|
||||||
uuid_generate(uuid);
|
|
||||||
#else
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
memcpy(uuid, qemu_uuid, sizeof(qemu_uuid));
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s/.qemu", home);
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
ret = mkdir(buffer);
|
|
||||||
#else
|
|
||||||
ret = mkdir(buffer, 0755);
|
|
||||||
#endif
|
|
||||||
if (ret == -1 && errno != EEXIST) {
|
|
||||||
fprintf(stderr, "could not open default QMP port\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s/.qemu/qmp", home);
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
ret = mkdir(buffer);
|
|
||||||
#else
|
|
||||||
ret = mkdir(buffer, 0755);
|
|
||||||
#endif
|
|
||||||
if (ret == -1 && errno != EEXIST) {
|
|
||||||
fprintf(stderr, "could not open default QMP port\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer),
|
|
||||||
"unix:%s/.qemu/qmp/" UUID_FMT ".sock,server,nowait",
|
|
||||||
home,
|
|
||||||
uuid[0], uuid[1], uuid[2], uuid[3],
|
|
||||||
uuid[4], uuid[5], uuid[6], uuid[7],
|
|
||||||
uuid[8], uuid[9], uuid[10], uuid[11],
|
|
||||||
uuid[12], uuid[13], uuid[14], uuid[15]);
|
|
||||||
|
|
||||||
monitor_parse(buffer, "control");
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv, char **envp)
|
int main(int argc, char **argv, char **envp)
|
||||||
{
|
{
|
||||||
const char *gdbstub_dev = NULL;
|
const char *gdbstub_dev = NULL;
|
||||||
|
@ -4680,9 +4620,6 @@ int main(int argc, char **argv, char **envp)
|
||||||
if (default_virtcon)
|
if (default_virtcon)
|
||||||
add_device_config(DEV_VIRTCON, "vc:80Cx24C");
|
add_device_config(DEV_VIRTCON, "vc:80Cx24C");
|
||||||
}
|
}
|
||||||
if (default_qmp) {
|
|
||||||
qmp_add_default();
|
|
||||||
}
|
|
||||||
if (default_vga)
|
if (default_vga)
|
||||||
vga_interface_type = VGA_CIRRUS;
|
vga_interface_type = VGA_CIRRUS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue