From: Peter Krempa Date: Tue, 10 Oct 2017 15:19:10 +0000 (+0200) Subject: virsh: domain: Fix option handling in domxml-to-native X-Git-Tag: v3.9.0-rc1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4973d1ea88b2e807fc2c52a5fc281a1c289d50e;p=thirdparty%2Flibvirt.git virsh: domain: Fix option handling in domxml-to-native Commit fdeac7a05fdf85458d72e89efcfa0f444525aaad tried to fix the output of 'virsh domxml-to-native --help' by switching types around. One of the changes broke the option parser. VSH_OT_ARGV should be used only for variable argument count, not to make the help generator look pretty. The correct option type in this case is VSH_OT_STRING as it's not mandatory now since it can be substituted by using --domain. This makes --help for this command look incorrect, but the parser works as it should. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1494400 --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index e1a312a6a6..1e33e82959 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -10152,7 +10152,7 @@ static const vshCmdOptDef opts_domxmltonative[] = { .help = N_("domain name, id or uuid") }, {.name = "xml", - .type = VSH_OT_ARGV, + .type = VSH_OT_STRING, .help = N_("xml data file to export from") }, {.name = NULL}