Il 02/08/2012 10:32, Wenchao Xia ha scritto:
>>
>> ssize_t qb_read(struct QBlockState *qbs, void *buf, size_t len,  off_t
>> offset)
>>
>   OK.
> 
>>> +{
>>> +    int ret;
>>> +    BlockDriverState *bs;
>>> +
>>> +    bs = (BlockDriverState *)qbs->bdrvs;
>>> +
>>> +    ret = bdrv_read(bs, start / 512,
>>> +                        buf, len / 512);
>>
>> IIRC there is a constant for 512 somewhere.
>>
>   will include that header.

Also assert that start and len are aligned.

Paolo


Reply via email to