[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2 for-2.10 2/4] block: Add errp to b{lk, drv}_t
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v2 for-2.10 2/4] block: Add errp to b{lk, drv}_truncate() |
Date: |
Tue, 28 Mar 2017 21:34:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 23.03.2017 18:46, Kevin Wolf wrote:
> Am 08.03.2017 um 20:14 hat Max Reitz geschrieben:
>> For one thing, this allows us to drop the error message generation from
>> qemu-img.c and blockdev.c and instead have it unified in
>> bdrv_truncate().
>>
>> Signed-off-by: Max Reitz <address@hidden>
>
>> diff --git a/block/qcow2.c b/block/qcow2.c
>> index 6a92d2ef3f..43b8a986f0 100644
>> --- a/block/qcow2.c
>> +++ b/block/qcow2.c
>> @@ -2294,9 +2294,8 @@ static int qcow2_create2(const char *filename, int64_t
>> total_size,
>> }
>>
>> /* Okay, now that we have a valid image, let's give it the right size */
>> - ret = blk_truncate(blk, total_size);
>> + ret = blk_truncate(blk, total_size, errp);
>> if (ret < 0) {
>> - error_setg_errno(errp, -ret, "Could not resize image");
>
> Maybe error_prepend(errp, "Could not resize image: ") could make sense?
Sure, why not.
Max
>> goto out;
>> }
>
> Kevin
>
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH v2 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate(), Max Reitz, 2017/03/08
- [Qemu-block] [PATCH v2 for-2.10 1/4] block/vhdx: Make vhdx_create() always set errp, Max Reitz, 2017/03/08
- [Qemu-block] [PATCH v2 for-2.10 2/4] block: Add errp to b{lk, drv}_truncate(), Max Reitz, 2017/03/08
- [Qemu-block] [PATCH v2 for-2.10 3/4] block: Add errp to BD.bdrv_truncate(), Max Reitz, 2017/03/08
- [Qemu-block] [PATCH v2 for-2.10 4/4] block: Add some bdrv_truncate() error messages, Max Reitz, 2017/03/08
- Re: [Qemu-block] [PATCH v2 for-2.10 0/4] block: Add errp to b{lk, drv}_truncate(), Kevin Wolf, 2017/03/23