mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
net: Remove the legacy "-net channel" parameter
It has never been documented, so hardly anybody knows about this parameter, and it is marked as deprecated since QEMU v2.6. Time to let it go now. Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
This commit is contained in:
parent
d9caeb09b1
commit
3a22ee2734
4 changed files with 0 additions and 48 deletions
34
net/slirp.c
34
net/slirp.c
|
@ -956,37 +956,3 @@ int net_init_slirp(const Netdev *netdev, const char *name,
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int net_slirp_parse_legacy(QemuOptsList *opts_list, const char *optarg, int *ret)
|
||||
{
|
||||
if (strcmp(opts_list->name, "net") != 0 ||
|
||||
strncmp(optarg, "channel,", strlen("channel,")) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
error_report("The '-net channel' option is deprecated. "
|
||||
"Please use '-netdev user,guestfwd=...' instead.");
|
||||
|
||||
/* handle legacy -net channel,port:chr */
|
||||
optarg += strlen("channel,");
|
||||
|
||||
if (QTAILQ_EMPTY(&slirp_stacks)) {
|
||||
struct slirp_config_str *config;
|
||||
|
||||
config = g_malloc(sizeof(*config));
|
||||
pstrcpy(config->str, sizeof(config->str), optarg);
|
||||
config->flags = SLIRP_CFG_LEGACY;
|
||||
config->next = slirp_configs;
|
||||
slirp_configs = config;
|
||||
*ret = 0;
|
||||
} else {
|
||||
Error *err = NULL;
|
||||
*ret = slirp_guestfwd(QTAILQ_FIRST(&slirp_stacks), optarg, 1, &err);
|
||||
if (*ret < 0) {
|
||||
error_report_err(err);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue