[libvirt] [PATCH v6 5/6] virsh: Expose new virDomainFSFreeze and virDomainFSThaw API
Daniel P. Berrange
berrange at redhat.com
Thu May 1 09:38:40 UTC 2014
On Wed, Apr 30, 2014 at 01:44:07PM -0600, Eric Blake wrote:
> On 04/30/2014 10:52 AM, Tomoki Sekiyama wrote:
>
> >
> >> I'd think it'd be better to just allow multiple instances of
> >> the arg eg
> >>
> >> virsh fsfreeze --mount <path1> --mount <path2> <guest>
> >
> > the virsh option parser rejects repeated options by
> >
> > error: option --mount already seen
> >
> > so I chose comma separated list, which is also used in the
> > "undefine --storage" option that takes a list of targets or source paths.
> >
> > Do we need to extend the parser to enable the repeated options?
> >
>
> The parser already accepts repeated options (well, precisely ONE
> repeated option), by making that option be last in the command
> description and giving it .type = VSH_OT_ARGV. For comparison, see the
> echo command in virsh.c or the send-key command in virsh-domain.c.
That seems rather uneccessarily strict to me. I think it is entirely
valid to allow any --fooo option to be marked as allowing repeats,
not require it to be the final non-option argument.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list