|
| From: | Paolo Bonzini |
| Subject: | Re: [Qemu-devel] [RFC PATCH 07/14] NBD client: implement block driver interfaces for block replication |
| Date: | Thu, 26 Feb 2015 15:08:03 +0100 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 23/02/2015 22:41, Max Reitz wrote:
>>
>> }
>> +static int nbd_start_replication(BlockDriverState *bs, int mode)
>> +{
>> + BDRVNBDState *s = bs->opaque;
>> + Error *local_err = NULL;
>> + int ret;
>> +
>> + /*
>> + * TODO: support COLO_SECONDARY_MODE if we allow secondary
>> + * QEMU becoming primary QEMU.
>> + */
>> + if (mode != COLO_PRIMARY_MODE) {
>> + return -1;
>
> Once again, I'd like -ENOTSUP more (or -EINVAL or whatever you prefer).
Using the Error API is the right thing to do here.
Paolo
| [Prev in Thread] | Current Thread | [Next in Thread] |