aboutsummaryrefslogtreecommitdiff
path: root/dump
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-10-31 11:45:29 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-02 18:40:50 +0400
commitf8c49724cbe13fa30b5893eff33f9ccee7e4466a (patch)
treecd233c4deed339ce4e1f43cc6e03f2c8076b5d70 /dump
parent96afbc571c91b115ba51d9740352a0e45111edc9 (diff)
downloadqemu-f8c49724cbe13fa30b5893eff33f9ccee7e4466a.zip
qemu-f8c49724cbe13fa30b5893eff33f9ccee7e4466a.tar.gz
qemu-f8c49724cbe13fa30b5893eff33f9ccee7e4466a.tar.bz2
dump: Recognize "fd:" protocols on Windows hosts
A few QMP command can work with named file descriptors. The only way to create a named file descriptor used to be QMP command getfd, which only works on POSIX hosts. Thus, named file descriptors were actually usable only there. They became usable on Windows hosts when we added QMP command get-win32-socket (commit 4cda177c601 "qmp: add 'get-win32-socket'"). Except in dump-guest-memory, because qmp_dump_guest_memory() compiles its named file descriptor code only #if !defined(WIN32). Compile it unconditionally, like we do for the other commands supporting them. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20231031104531.3169721-4-armbru@redhat.com>
Diffstat (limited to 'dump')
-rw-r--r--dump/dump.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/dump/dump.c b/dump/dump.c
index 24c829e..2d0b5bd 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -2170,14 +2170,12 @@ void qmp_dump_guest_memory(bool paging, const char *protocol,
return;
}
-#if !defined(WIN32)
if (strstart(protocol, "fd:", &p)) {
fd = monitor_get_fd(monitor_cur(), p, errp);
if (fd == -1) {
return;
}
}
-#endif
if (strstart(protocol, "file:", &p)) {
fd = qemu_open_old(p, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR);