summary refs log tree commit diff stats
path: root/include/net/net.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-11 05:52:22 -0500
committerJason Wang <jasowang@redhat.com>2020-11-24 10:40:17 +0800
commitad6f932fe8d1fc7f37ec17c7520aec68d3ee3706 (patch)
treebcc38a02aad021c16fa50df9d448683a3e0d44f6 /include/net/net.h
parentc2cb511634012344e3d0fe49a037a33b12d8a98a (diff)
downloadfocaccia-qemu-ad6f932fe8d1fc7f37ec17c7520aec68d3ee3706.tar.gz
focaccia-qemu-ad6f932fe8d1fc7f37ec17c7520aec68d3ee3706.zip
net: do not exit on "netdev_add help" monitor command
"netdev_add help" is causing QEMU to exit because the code that
invokes show_netdevs is shared between CLI and HMP processing.
Move the check to the callers so that exit(0) remains only
in the CLI flow.

"netdev_add help" is not fixed by this patch; that is left for
later work.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/net/net.h')
-rw-r--r--include/net/net.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/net.h b/include/net/net.h
index 897b2d7595..778fc787ca 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -199,6 +199,7 @@ extern const char *host_net_devices[];
 
 /* from net.c */
 int net_client_parse(QemuOptsList *opts_list, const char *str);
+void show_netdevs(void);
 int net_init_clients(Error **errp);
 void net_check_clients(void);
 void net_cleanup(void);