[libvirt] [PATCH v2 2/8] blockcopy: split out virsh implementation

Eric Blake eblake at redhat.com
Wed Aug 27 04:16:47 UTC 2014


On 08/26/2014 09:00 AM, Peter Krempa wrote:
> On 08/26/14 13:21, Eric Blake wrote:
>> I'm about to extend the capabilities of blockcopy.  Hiding a few
>> common lines of implementation gets in the way of the new required
>> logic, and putting the new logic in the common implementation won't
>> benefit any of the other blockjob operations.  Therefore, it is
>> simpler to just do the work inline.
>>
>> * tools/virsh-domain.c (blockJobImpl): Drop unused variable. Move

>>      virDomainPtr dom = NULL;
>> -    const char *name, *path;
>> +    const char *path;
> 
> This ...
> 
>>      unsigned long bandwidth = 0;
>>      int ret = -1;
>>      const char *base = NULL;
>>      const char *top = NULL;
>>      unsigned int flags = 0;
>>
>> -    if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
>> +    if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
> 
> .. and this are unrelated changes.
> 
>>          goto cleanup;
>>
>>      if (vshCommandOptStringReq(ctl, cmd, "path", &path) < 0)
> 
> ACK although I'd rather see the two changes separate.

Sure. I've pushed the dead variable deletion as a separate patch,
although I'm going to rebase the rest of this for v3 on top of my work
for allowing the old API to request type='block'.

-- 
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: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140826/9c45f334/attachment-0001.sig>


More information about the libvir-list mailing list