mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
net: add QemuOptsList arg to net_client_parse()
Patchworks-ID: 35505 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d80b9fc628
commit
7f161aaea6
3 changed files with 6 additions and 5 deletions
7
net.c
7
net.c
|
@ -3231,11 +3231,12 @@ int net_init_clients(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int net_client_parse(const char *optarg)
|
||||
int net_client_parse(QemuOptsList *opts_list, const char *optarg)
|
||||
{
|
||||
#if defined(CONFIG_SLIRP)
|
||||
/* handle legacy -net channel,port:chr */
|
||||
if (!strncmp(optarg, "channel,", strlen("channel,"))) {
|
||||
if (!strcmp(opts_list->name, "net") &&
|
||||
!strncmp(optarg, "channel,", strlen("channel,"))) {
|
||||
int ret;
|
||||
|
||||
optarg += strlen("channel,");
|
||||
|
@ -3256,7 +3257,7 @@ int net_client_parse(const char *optarg)
|
|||
return ret;
|
||||
}
|
||||
#endif
|
||||
if (!qemu_opts_parse(&qemu_net_opts, optarg, "type")) {
|
||||
if (!qemu_opts_parse(opts_list, optarg, "type")) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue