From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Dr. David Alan Gilbert" <dave@treblig.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
richard.henderson@linaro.org, "Beraldo Leal" <bleal@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>
Subject: [PULL 6/8] dump: Recognize "fd:" protocols on Windows hosts
Date: Fri, 3 Nov 2023 11:01:34 +0400 [thread overview]
Message-ID: <20231103070136.437557-7-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20231103070136.437557-1-marcandre.lureau@redhat.com>
From: Markus Armbruster <armbru@redhat.com>
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>
---
dump/dump.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/dump/dump.c b/dump/dump.c
index 24c829e705..2d0b5bd22b 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);
--
2.41.0
next prev parent reply other threads:[~2023-11-03 7:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 7:01 [PULL 0/8] Dump patches marcandre.lureau
2023-11-03 7:01 ` [PULL 1/8] dump: Pass DumpState to write_ functions marcandre.lureau
2023-11-03 7:01 ` [PULL 2/8] dump: Allow directly outputting raw kdump format marcandre.lureau
2023-11-03 7:01 ` [PULL 3/8] dump: Add command interface for kdump-raw formats marcandre.lureau
2023-11-07 13:54 ` Peter Maydell
2023-11-08 5:39 ` Markus Armbruster
2023-11-08 7:37 ` Stephen Brennan
2023-11-03 7:01 ` [PULL 4/8] dump: Rename qmp_dump_guest_memory() parameter to match QAPI schema marcandre.lureau
2023-11-03 7:01 ` [PULL 5/8] dump: Fix g_array_unref(NULL) in dump-guest-memory marcandre.lureau
2023-11-03 7:01 ` marcandre.lureau [this message]
2023-11-03 7:01 ` [PULL 7/8] dump: Improve some dump-guest-memory error messages marcandre.lureau
2023-11-03 7:01 ` [PULL 8/8] dump: Drop redundant check for empty dump marcandre.lureau
2023-11-06 14:22 ` [PULL 0/8] Dump patches Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231103070136.437557-7-marcandre.lureau@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=bleal@redhat.com \
--cc=dave@treblig.org \
--cc=eblake@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).