vl.c: error out if -mem-path is used together with -M memory-backend

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>
This commit is contained in:
Igor Mammedov 2020-04-09 09:41:33 -04:00 committed by Paolo Bonzini
parent fb8a9677b1
commit 1148e4f4dc
1 changed files with 5 additions and 0 deletions

View 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;
}