]> git.proxmox.com Git - mirror_qemu.git/commitdiff
vl.c: error out if -mem-path is used together with -M memory-backend
authorIgor Mammedov <imammedo@redhat.com>
Thu, 9 Apr 2020 13:41:33 +0000 (09:41 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 13 Apr 2020 06:56:18 +0000 (02:56 -0400)
the former is not actually used by explicit backend, so instead of
silently ignoring the option in non valid context, exit with error.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20200409134133.11339-1-imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
softmmu/vl.c

index 58a40bcfc19c2e2ff67e8a15affdd48f583a5591..32c004788919e4f50b4bfc88113bfd5a98e70e08 100644 (file)
@@ -4315,6 +4315,11 @@ void qemu_init(int argc, char **argv, char **envp)
                              "explicitly specified 'memory-backend' property");
                 exit(EXIT_FAILURE);
         }
+        if (mem_path) {
+            error_report("'-mem-path' can't be used together with"
+                         "'-machine memory-backend'");
+            exit(EXIT_FAILURE);
+        }
         ram_size = backend_size;
     }