From: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>
To: qemu-devel@nongnu.org
Cc: Miguel Di Ciurcio Filho <miguel.filho@gmail.com>, avi@redhat.com
Subject: [Qemu-devel] [PATCH 7/8] vlan cleanup: remove legacy monitor commands
Date: Mon, 12 Jul 2010 16:20:52 -0300 [thread overview]
Message-ID: <1278962453-15774-8-git-send-email-miguel.filho@gmail.com> (raw)
In-Reply-To: <1278962453-15774-1-git-send-email-miguel.filho@gmail.com>
---
net.c | 60 -------------------------------------------------------
net.h | 2 -
qemu-monitor.hx | 28 -------------------------
3 files changed, 0 insertions(+), 90 deletions(-)
diff --git a/net.c b/net.c
index addd167..2c1c50f 100644
--- a/net.c
+++ b/net.c
@@ -1095,66 +1095,6 @@ int net_client_init(Monitor *mon, QemuOpts *opts, int is_netdev)
return -1;
}
-static int net_host_check_device(const char *device)
-{
- int i;
- const char *valid_param_list[] = { "tap", "socket", "dump"
-#ifdef CONFIG_SLIRP
- ,"user"
-#endif
-#ifdef CONFIG_VDE
- ,"vde"
-#endif
- };
- for (i = 0; i < sizeof(valid_param_list) / sizeof(char *); i++) {
- if (!strncmp(valid_param_list[i], device,
- strlen(valid_param_list[i])))
- return 1;
- }
-
- return 0;
-}
-
-void net_host_device_add(Monitor *mon, const QDict *qdict)
-{
- const char *device = qdict_get_str(qdict, "device");
- const char *opts_str = qdict_get_try_str(qdict, "opts");
- QemuOpts *opts;
-
- if (!net_host_check_device(device)) {
- monitor_printf(mon, "invalid host network device %s\n", device);
- return;
- }
-
- opts = qemu_opts_parse(&qemu_net_opts, opts_str ? opts_str : "", 0);
- if (!opts) {
- return;
- }
-
- qemu_opt_set(opts, "type", device);
-
- if (net_client_init(mon, opts, 0) < 0) {
- monitor_printf(mon, "adding host network device %s failed\n", device);
- }
-}
-
-void net_host_device_remove(Monitor *mon, const QDict *qdict)
-{
- VLANClientState *vc;
- int vlan_id = qdict_get_int(qdict, "vlan_id");
- const char *device = qdict_get_str(qdict, "device");
-
- vc = qemu_find_vlan_client_by_name(mon, vlan_id, device);
- if (!vc) {
- return;
- }
- if (!net_host_check_device(vc->model)) {
- monitor_printf(mon, "invalid host network device %s\n", device);
- return;
- }
- qemu_del_vlan_client(vc);
-}
-
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
QemuOpts *opts;
diff --git a/net.h b/net.h
index 518cf9c..b3c5ca3 100644
--- a/net.h
+++ b/net.h
@@ -161,8 +161,6 @@ int net_client_parse(QemuOptsList *opts_list, const char *str);
int net_init_clients(void);
void net_check_clients(void);
void net_cleanup(void);
-void net_host_device_add(Monitor *mon, const QDict *qdict);
-void net_host_device_remove(Monitor *mon, const QDict *qdict);
int do_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret_data);
int do_netdev_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 2af3de6..275f3bc 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -1154,34 +1154,6 @@ Hot remove PCI device.
ETEXI
{
- .name = "host_net_add",
- .args_type = "device:s,opts:s?",
- .params = "tap|user|socket|vde|dump [options]",
- .help = "add host VLAN client",
- .mhandler.cmd = net_host_device_add,
- },
-
-STEXI
-@item host_net_add
-@findex host_net_add
-Add host VLAN client.
-ETEXI
-
- {
- .name = "host_net_remove",
- .args_type = "vlan_id:i,device:s",
- .params = "vlan_id name",
- .help = "remove host VLAN client",
- .mhandler.cmd = net_host_device_remove,
- },
-
-STEXI
-@item host_net_remove
-@findex host_net_remove
-Remove host VLAN client.
-ETEXI
-
- {
.name = "netdev_add",
.args_type = "netdev:O",
.params = "[user|tap|socket],id=str[,prop=value][,...]",
--
1.7.1
next prev parent reply other threads:[~2010-07-12 19:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 19:20 [Qemu-devel] [PATCH 0/8] vlan cleanup Miguel Di Ciurcio Filho
2010-07-12 19:20 ` [Qemu-devel] [PATCH 1/8] vlan cleanup: update documentation Miguel Di Ciurcio Filho
2010-07-14 6:11 ` Markus Armbruster
2010-07-12 19:20 ` [Qemu-devel] [PATCH 2/8] vlan cleanup: update options Miguel Di Ciurcio Filho
2010-07-14 6:20 ` Markus Armbruster
2010-07-12 19:20 ` [Qemu-devel] [PATCH 3/8] vlan cleanup: do not depend on socket and dump Miguel Di Ciurcio Filho
2010-07-12 19:20 ` [Qemu-devel] [PATCH 4/8] vlan cleanup: do not build " Miguel Di Ciurcio Filho
2010-07-12 19:20 ` [Qemu-devel] [PATCH 5/8] vlan cleanup: remove socket.h and socket.c Miguel Di Ciurcio Filho
2010-07-12 19:20 ` [Qemu-devel] [PATCH 6/8] vlan cleanup: remove dump.h and dump.c Miguel Di Ciurcio Filho
2010-07-12 19:20 ` Miguel Di Ciurcio Filho [this message]
2010-07-12 19:20 ` [Qemu-devel] [PATCH 8/8] vlan cleanup: remove usage of VLANState Miguel Di Ciurcio Filho
2010-07-14 6:54 ` Markus Armbruster
2010-07-14 7:18 ` [Qemu-devel] " Jan Kiszka
2010-07-13 6:16 ` [Qemu-devel] Re: [PATCH 0/8] vlan cleanup Jan Kiszka
2010-07-13 12:22 ` Miguel Di Ciurcio Filho
2010-07-13 12:48 ` Jan Kiszka
2010-07-13 18:51 ` Anthony Liguori
2010-07-13 19:08 ` Jan Kiszka
2010-07-13 19:22 ` Anthony Liguori
2010-07-13 20:12 ` Jan Kiszka
2010-07-14 7:08 ` Markus Armbruster
2010-07-14 7:28 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278962453-15774-8-git-send-email-miguel.filho@gmail.com \
--to=miguel.filho@gmail.com \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).