qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Avoid crashing on multiple -incoming
@ 2015-02-26 14:16 Dr. David Alan Gilbert (git)
  2015-02-26 15:26 ` Eric Blake
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2015-02-26 14:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: amit.shah, armbru, quintela

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>
---
 vl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index e1ffd0a..aefc66d 100644
--- a/vl.c
+++ b/vl.c
@@ -3610,8 +3610,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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-03-25 10:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 14:16 [Qemu-devel] [PATCH] Avoid crashing on multiple -incoming Dr. David Alan Gilbert (git)
2015-02-26 15:26 ` Eric Blake
2015-03-02  6:34 ` Amit Shah
2015-03-25 10:58 ` Juan Quintela

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).