diff mbox series

[RESEND,v6,27/36] multi-process: add support to parse device option

Message ID 13ee2e7d8487aefb9f3b12736baab7d74d5599ec.1587614626.git.elena.ufimtseva@oracle.com
State New
Headers show
Series [RESEND,v6,01/36] memory: alloc RAM from file at offset | expand

Commit Message

Elena Ufimtseva April 23, 2020, 4:14 a.m. UTC
From: Elena Ufimtseva <elena.ufimtseva@oracle.com>

Enable remote process to parse device command line option

Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com>
Signed-off-by: Jagannathan Raman <jag.raman@oracle.com>
Signed-off-by: John G Johnson <john.g.johnson@oracle.com>
---
 remote/remote-opts.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/remote/remote-opts.c b/remote/remote-opts.c
index cb7837bf13..f077221c71 100644
--- a/remote/remote-opts.c
+++ b/remote/remote-opts.c
@@ -57,6 +57,13 @@  void parse_cmdline(int argc, char **argv, char **envp)
                     exit(1);
                 }
                 break;
+            case QEMU_OPTION_device:
+                if (!qemu_opts_parse_noisily(qemu_find_opts("device"),
+                                            optarg, true)) {
+                    error_report("Unable to process device command");
+                    exit(1);
+                }
+            break;
             default:
                 break;
             }
@@ -71,5 +78,8 @@  void parse_cmdline(int argc, char **argv, char **envp)
         exit(0);
     }
 
+    qemu_opts_foreach(qemu_find_opts("device"), device_init_func, NULL,
+                      &error_fatal);
+
     return;
 }