On 04/10/2017 09:37 PM, Philippe Mathieu-Daudé wrote:
> Hi Eric,
> 
> On 04/10/2017 10:17 PM, Eric Blake wrote:
>> For the 'alloc' command, accepting an offset in bytes but a length
>> in sectors, and reporting output in sectors, is confusing.  Do
>> everything in bytes, and adjust the expected output accordingly.
>>

>>          }
>>      } else {
>> -        nb_sectors = 1;
>> +        bytes = BDRV_SECTOR_SIZE;
>>      }
>> +    if (bytes & 0x1ff) {
> 
> This macro is self-explanatory:
> 
> if(!QEMU_IS_ALIGNED(bytes, BDRV_SECTOR_SIZE))

Indeed; but I was going for copy-and-paste consistency with the rest of
the file that also open-codes this.  A separate cleanup patch for all of
them would qualify as trivial.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to