Other options like "-chardev" or "-device" feature a nice help text
with the available devices when being called with "help" or "?".
Since it is quite useful, especially if you want to see which network
backends have been compiled into the QEMU binary, let's provide such
a help text for "-netdev", too.
Signed-off-by: Thomas Huth <address@hidden>
---
net/net.c | 37 ++++++++++++++++++++++++++++++++++++-
1 file changed, 36 insertions(+), 1 deletion(-)
@@ -1094,7 +1126,10 @@ int net_client_init(QemuOpts *opts, bool is_netdev,
Error **errp)
int ret = -1;
Visitor *v = opts_visitor_new(opts);
- {
+ if (is_netdev && is_help_option(qemu_opt_get(opts, "type"))) {
+ show_netdevs();
+ exit(1);