net: do not exit on "netdev_add help" monitor command
commitad6f932fe8d1fc7f37ec17c7520aec68d3ee3706
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 11 Nov 2020 10:52:22 +0000 (11 05:52 -0500)
committerJason Wang <jasowang@redhat.com>
Tue, 24 Nov 2020 02:40:17 +0000 (24 10:40 +0800)
treebcc38a02aad021c16fa50df9d448683a3e0d44f6
parentc2cb511634012344e3d0fe49a037a33b12d8a98a
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>
include/net/net.h
monitor/hmp-cmds.c
net/net.c