qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: [Qemu-devel] [PULL 1/3] Avoid crashing on multiple -incoming
Date: Thu, 26 Mar 2015 15:45:56 +0100	[thread overview]
Message-ID: <1427381158-9069-2-git-send-email-quintela@redhat.com> (raw)
In-Reply-To: <1427381158-9069-1-git-send-email-quintela@redhat.com>

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

Passing multiple -incoming options used to crash qemu (due to
an invalid state transition incoming->incoming).  Instead we now
take the last -incoming option, e.g.:

qemu-system-x86_64 -nographic -incoming tcp::4444 -incoming defer

ends up doing the defer.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 vl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index 75ec292..74c2681 100644
--- a/vl.c
+++ b/vl.c
@@ -3618,8 +3618,10 @@ int main(int argc, char **argv, char **envp)
                 }
                 break;
             case QEMU_OPTION_incoming:
+                if (!incoming) {
+                    runstate_set(RUN_STATE_INMIGRATE);
+                }
                 incoming = optarg;
-                runstate_set(RUN_STATE_INMIGRATE);
                 break;
             case QEMU_OPTION_nodefaults:
                 has_defaults = 0;
-- 
2.1.0

  reply	other threads:[~2015-03-26 14:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 14:45 [Qemu-devel] [PULL 0/3] Migration pull request Juan Quintela
2015-03-26 14:45 ` Juan Quintela [this message]
2015-03-26 14:45 ` [Qemu-devel] [PULL 2/3] rdma: Fix cleanup in error paths Juan Quintela
2015-03-26 14:45 ` [Qemu-devel] [PULL 3/3] migration: remove last_sent_block from save_page_header Juan Quintela
2015-03-26 15:42 ` [Qemu-devel] [PULL 0/3] Migration pull request Peter Maydell

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=1427381158-9069-2-git-send-email-quintela@redhat.com \
    --to=quintela@redhat.com \
    --cc=dgilbert@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 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).