[libvirt] [PATCH 1/5]virsh: disable config readonly and shareable in virsh command
Chen Hanxiao
chenhanxiao at cn.fujitsu.com
Wed Oct 23 08:57:13 UTC 2013
Hi
> -----Original Message-----
> From: Eric Blake [mailto:eblake at redhat.com]
> Sent: Tuesday, October 22, 2013 2:26 PM
> To: Michal Privoznik; Chen Hanxiao
> Cc: libvir-list at redhat.com
>
> >
> > - if (vshCommandOptBool(cmd, "shareable"))
> > + if (vshCommandOptBool(cmd, "shareable")) {
> > + if (mode) {
> > + vshError(ctl, "%s", _("--shareable and --mode are mutually
> exclusive"));
> > + goto cleanup;
> > + }
> > virBufferAddLit(&buf, " <shareable/>\n");
> > + }
>
> I don't think either of these approaches are needed. If you make
> --shareable an undocumented alias of --mode=shareable, then the alias
> handling code will already guarantee that only one of the two spellings
> appears, and you don't have to do any screening here.
>
I think we still need these codes.
We can stop <TAB> to complete it and we can also undocument it.
But if users just type "--mode=readonly --shareable" and press ENTER, we still need screen here.
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
More information about the libvir-list
mailing list