[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v6 11/18] qcow2: convert QCow2 to use QCryptoBlo
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v6 11/18] qcow2: convert QCow2 to use QCryptoBlock for encryption |
Date: |
Thu, 25 May 2017 12:46:03 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Wed 24 May 2017 06:46:31 PM CEST, Daniel P. Berrange wrote:
>> > + case QCOW_CRYPT_AES:
>> > + if (encryptfmt && !g_str_equal(encryptfmt, "aes")) {
>> > + error_setg(errp,
>> > + "Header reported 'aes' encryption format but "
>> > + "options specify '%s'", encryptfmt);
>> > + ret = -EINVAL;
>> > + goto fail;
>> > + }
>>
>> ...and here you could break instead, the condition immediately after
>> the switch sets ret to -EINVAL and returns.
>
> In thi case I think its clearer to set it right here, rather than
> having to follow the code paths through & read the later logic
Ok, works for me! :)
Berto