All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com
Subject: [PATCH 1/5] dump: Rename qmp_dump_guest_memory() parameter to match QAPI schema
Date: Mon, 30 Oct 2023 14:37:08 +0100	[thread overview]
Message-ID: <20231030133712.2822276-2-armbru@redhat.com> (raw)
In-Reply-To: <20231030133712.2822276-1-armbru@redhat.com>

The name of the second parameter differs between QAPI schema and C
implementation: it's @protocol in the former and @file in the latter.
Potentially confusing.  Change the C implementation to match the QAPI
schema.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 dump/dump.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/dump/dump.c b/dump/dump.c
index d355ada62e..a1fad17f9c 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -2061,11 +2061,12 @@ DumpQueryResult *qmp_query_dump(Error **errp)
     return result;
 }
 
-void qmp_dump_guest_memory(bool paging, const char *file,
+void qmp_dump_guest_memory(bool paging, const char *protocol,
                            bool has_detach, bool detach,
-                           bool has_begin, int64_t begin, bool has_length,
-                           int64_t length, bool has_format,
-                           DumpGuestMemoryFormat format, Error **errp)
+                           bool has_begin, int64_t begin,
+                           bool has_length, int64_t length,
+                           bool has_format, DumpGuestMemoryFormat format,
+                           Error **errp)
 {
     ERRP_GUARD();
     const char *p;
@@ -2128,7 +2129,7 @@ void qmp_dump_guest_memory(bool paging, const char *file,
     }
 
 #if !defined(WIN32)
-    if (strstart(file, "fd:", &p)) {
+    if (strstart(protocol, "fd:", &p)) {
         fd = monitor_get_fd(monitor_cur(), p, errp);
         if (fd == -1) {
             return;
@@ -2136,7 +2137,7 @@ void qmp_dump_guest_memory(bool paging, const char *file,
     }
 #endif
 
-    if  (strstart(file, "file:", &p)) {
+    if  (strstart(protocol, "file:", &p)) {
         fd = qemu_open_old(p, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR);
         if (fd < 0) {
             error_setg_file_open(errp, errno, p);
-- 
2.41.0



  reply	other threads:[~2023-10-30 13:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30 13:37 [PATCH 0/5] dump: Minor fixes & improvements Markus Armbruster
2023-10-30 13:37 ` Markus Armbruster [this message]
2023-10-31  6:54   ` [PATCH 1/5] dump: Rename qmp_dump_guest_memory() parameter to match QAPI schema Marc-André Lureau
2023-10-30 13:37 ` [PATCH 2/5] dump: Fix g_array_unref(NULL) in dump-guest-memory Markus Armbruster
2023-10-31  6:53   ` Marc-André Lureau
2023-10-31  9:02     ` Markus Armbruster
2023-10-31  9:06       ` Markus Armbruster
2023-10-31 10:09         ` Marc-André Lureau
2023-10-30 13:37 ` [PATCH 3/5] dump: Recognize "fd:" protocols on Windows hosts Markus Armbruster
2023-10-31  6:55   ` Marc-André Lureau
2023-10-30 13:37 ` [PATCH 4/5] dump: Improve some dump-guest-memory error messages Markus Armbruster
2023-10-30 14:05   ` Philippe Mathieu-Daudé
2023-10-31  5:44     ` Markus Armbruster
2023-10-30 13:37 ` [PATCH 5/5] dump: Drop redundant check for empty dump Markus Armbruster
2023-10-31 10:23   ` Marc-André Lureau

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=20231030133712.2822276-2-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.