[libvirt] [PATCH v4] storage: netfs and iscsi need option srcSpec for resource discovery

Guannan Ren gren at redhat.com
Thu Aug 2 03:03:45 UTC 2012


On 08/01/2012 10:51 PM, Osier Yang wrote:
> On 2012年07月31日 16:56, Guannan Ren wrote:
>
>> diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
>> index af80427..0f0b21e 100644
>> --- a/tools/virsh-pool.c
>> +++ b/tools/virsh-pool.c
>> @@ -1093,6 +1093,12 @@ cmdPoolDiscoverSources(vshControl * ctl, const 
>> vshCmd * cmd ATTRIBUTE_UNUSED)
>>       if (srcSpecFile&&  virFileReadAll(srcSpecFile, 
>> VIRSH_MAX_XML_FILE,&srcSpec)<  0)
>>           return false;
>>
>> +    if (!srcSpec&&  (STREQ(type, "netfs") || STREQ(type, "iscsi"))) {
>
> Everything looks fine, except here. You will get error like:
>
> "pool type 'foobar' requires options ...."
>
> If one input 'foobar' as the pool type.
>
> My opinion is not checking it in virsh, just let it goes through
> the APIs.
>
> ACK with the virsh hacking removed.
>
>

        Thanks for this review. I removed the change on virsh.
        pushed.







More information about the libvir-list mailing list