aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2017-12-19 16:28:54 +0100
committerJason Wang <jasowang@redhat.com>2017-12-22 10:05:26 +0800
commit3a22ee27340aee063b442daa37ae684e9a114a91 (patch)
tree52a2b478df5b7707e4812a3f7bb3e7d74ca7b00b /net
parentd9caeb09b107e91122d10ba4a08a4af2b59c69cf (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/net.c7
-rw-r--r--net/slirp.c34
2 files changed, 0 insertions, 41 deletions
diff --git a/net/net.c b/net/net.c
index 5bc0a343ae..2b81c93193 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1565,13 +1565,6 @@ int net_init_clients(void)
int net_client_parse(QemuOptsList *opts_list, const char *optarg)
{
-#if defined(CONFIG_SLIRP)
- int ret;
- if (net_slirp_parse_legacy(opts_list, optarg, &ret)) {
- return ret;
- }
-#endif
-
if (!qemu_opts_parse_noisily(opts_list, optarg, true)) {
return -1;
}
diff --git a/net/slirp.c b/net/slirp.c
index 318a26e892..cb8ca2312f 100644
--- a/net/slirp.c
+++ b/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;
-}
-