summary refs log tree commit diff stats
path: root/monitor/hmp-cmds.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-11-24 10:59:12 +0000
committerPeter Maydell <peter.maydell@linaro.org>2020-11-24 10:59:12 +0000
commitd536d9578ec3ac5029a70b8126cb84bb6f2124a4 (patch)
treeb0d7a180756d1560a4dfa4ff294fd8f573c07a23 /monitor/hmp-cmds.c
parent23895cbd82be95428e90168b12e925d0d3ca2f06 (diff)
parent9925990d01a92564af55f6f69d0f5f59b47609b1 (diff)
downloadfocaccia-qemu-d536d9578ec3ac5029a70b8126cb84bb6f2124a4.tar.gz
focaccia-qemu-d536d9578ec3ac5029a70b8126cb84bb6f2124a4.zip
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Tue 24 Nov 2020 02:41:01 GMT
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  net: Use correct default-path macro for downscript
  tap: fix a memory leak
  net: purge queued rx packets on queue deletion
  net: do not exit on "netdev_add help" monitor command
  hw/net/e1000e: advance desc_offset in case of null descriptor

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'monitor/hmp-cmds.c')
-rw-r--r--monitor/hmp-cmds.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index a6a6684df1..65d8ff4849 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -24,6 +24,7 @@
 #include "qemu/option.h"
 #include "qemu/timer.h"
 #include "qemu/sockets.h"
+#include "qemu/help_option.h"
 #include "monitor/monitor-internal.h"
 #include "qapi/error.h"
 #include "qapi/clone-visitor.h"
@@ -1631,7 +1632,12 @@ void hmp_netdev_add(Monitor *mon, const QDict *qdict)
 {
     Error *err = NULL;
     QemuOpts *opts;
+    const char *type = qdict_get_try_str(qdict, "type");
 
+    if (type && is_help_option(type)) {
+        show_netdevs();
+        return;
+    }
     opts = qemu_opts_from_qdict(qemu_find_opts("netdev"), qdict, &err);
     if (err) {
         goto out;