diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2015-02-26 14:16:06 +0000 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2015-03-26 15:31:46 +0100 |
commit | 7c76235a3e6e24f596ab4b157157bd62f44b80f5 (patch) | |
tree | 321281f0890a809ed213737dba7256a35bca26ad /vl.c | |
parent | 087c4c9419d3086ac0a920899e4fed8ceaf9bb2b (diff) |
Avoid crashing on multiple -incoming
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>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |