On Fri, Feb 01, 2019 at 02:42:10PM +0000, Vladimir Sementsov-Ogievskiy wrote: > 31.01.2019 16:46, Andrey Shinkevich wrote: > > Inform a user in case qcow2_get_specific_info fails to obtain > > QCOW2 image specific information. This patch is preliminary to > > the print of bitmap information in the 'qemu-img info' output. > > > > Signed-off-by: Andrey Shinkevich <andrey.shinkev...@virtuozzo.com> > > Reviewed-by: Eric Blake <ebl...@redhat.com> > > --- > > > [...] > > > --- a/block/crypto.c > > +++ b/block/crypto.c > > @@ -594,13 +594,13 @@ static int > > block_crypto_get_info_luks(BlockDriverState *bs, > > } > > > > static ImageInfoSpecific * > > -block_crypto_get_specific_info_luks(BlockDriverState *bs) > > +block_crypto_get_specific_info_luks(BlockDriverState *bs, Error **errp) > > { > > BlockCrypto *crypto = bs->opaque; > > ImageInfoSpecific *spec_info; > > QCryptoBlockInfo *info; > > > > - info = qcrypto_block_get_info(crypto->block, NULL); > > + info = qcrypto_block_get_info(crypto->block, errp); > > if (!info) { > > return NULL; > > } > > more context: > > if (info->format != Q_CRYPTO_BLOCK_FORMAT_LUKS) { > qapi_free_QCryptoBlockInfo(info); > return NULL; > } > > for a fast look, I think it should be assertion, not if, Daniel, am I right?
Sure, it could be an assertion. In practice it should never trigger eitherway. > Also, I think we don't have block/crypto.c in Cryptography section of > MAINTAINERS > by mistake, so you were not CC'ed. I tend to let the block maintainers merge patches under block/, since that's largely block layer integration. The guts of the block crypto stuff is under crypto/ Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|