[libvirt] [PATCH 1/5]virsh: disable config readonly and shareable in virsh command

Eric Blake eblake at redhat.com
Wed Oct 23 09:49:01 UTC 2013


On 10/23/2013 09:57 AM, Chen Hanxiao wrote:

>> 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.

No, the generic argument parser that checks that the user passed sane
arguments should have already flagged it before we get into
cmdAttachDisk, since the generic argument parser is what already knows
how to deal with VSH_OT_ALIAS.  Inside cmdAttachDisk, you shouldn't have
to check for --shareable at all; the alias code should have already
converted it to canonical form before getting to the specific command.

I'll see if I can help write a patch to fix VSH_OT_ALIAS.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131023/b94dc035/attachment-0001.sig>


More information about the libvir-list mailing list