diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-23 14:53:41 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2017-05-23 15:01:31 +0100 |
commit | 9964e96dc9999cf7f7c936ee854a795415d19b60 (patch) | |
tree | 61ade0d8a6d39f900e7e8f1779fc083a686f5d58 /net/net.c | |
parent | 730a6e875b137f74109cc93560a3f643d7ad8263 (diff) | |
parent | 82342e91b60a4a078811df4e1a545e57abffa11d (diff) | |
download | qemu-9964e96dc9999cf7f7c936ee854a795415d19b60.tar.gz |
Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging
# gpg: Signature made Tue 23 May 2017 03:27:37 AM BST
# gpg: using RSA key 0xEF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>"
# Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211
* jasowang/tags/net-pull-request:
e1000e: Fix ICR "Other" causes clear logic
net/filter-rewriter: Remove unused option in filter-rewriter
net/filter-mirror.c: Rename filter_mirror_send() and fix codestyle
net/filter-mirror.c: Remove duplicate check code.
hmp / net: Mark host_net_add/remove as deprecated
COLO-compare: Improve tcp compare trace event readability
virtio-net: fix wild pointer when remove virtio-net queues
net/dump: Issue a warning for the deprecated "-net dump"
net/tap: Replace tap-haiku.c and tap-aix.c by a generic tap-stub.c
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -45,6 +45,7 @@ #include "qapi-visit.h" #include "qapi/opts-visitor.h" #include "sysemu/sysemu.h" +#include "sysemu/qtest.h" #include "net/filter.h" #include "qapi/string-output-visitor.h" @@ -1149,6 +1150,12 @@ void hmp_host_net_add(Monitor *mon, const QDict *qdict) const char *opts_str = qdict_get_try_str(qdict, "opts"); Error *local_err = NULL; QemuOpts *opts; + static bool warned; + + if (!warned && !qtest_enabled()) { + error_report("host_net_add is deprecated, use netdev_add instead"); + warned = true; + } if (!net_host_check_device(device)) { monitor_printf(mon, "invalid host network device %s\n", device); @@ -1175,6 +1182,12 @@ void hmp_host_net_remove(Monitor *mon, const QDict *qdict) NetClientState *nc; int vlan_id = qdict_get_int(qdict, "vlan_id"); const char *device = qdict_get_str(qdict, "device"); + static bool warned; + + if (!warned && !qtest_enabled()) { + error_report("host_net_remove is deprecated, use netdev_del instead"); + warned = true; + } nc = net_hub_find_client_by_name(vlan_id, device); if (!nc) { |