mirror of https://github.com/xemu-project/xemu.git
net: print correct error for '-netdev ""'
Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
f401ca22d8
commit
0f2fbf40a9
8
net.c
8
net.c
|
@ -1055,12 +1055,18 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
|
|||
int i;
|
||||
|
||||
type = qemu_opt_get(opts, "type");
|
||||
|
||||
if (!is_netdev) {
|
||||
if (!type) {
|
||||
qemu_error("No type specified for -net\n");
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (!type) {
|
||||
qemu_error("No type specified for -netdev\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (is_netdev) {
|
||||
if (strcmp(type, "tap") != 0 &&
|
||||
#ifdef CONFIG_SLIRP
|
||||
strcmp(type, "user") != 0 &&
|
||||
|
|
Loading…
Reference in New Issue