On Sun, 02/09 10:48, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > block/qcow.c | 16 ++++++---------- > 1 file changed, 6 insertions(+), 10 deletions(-) > > diff --git a/block/qcow.c b/block/qcow.c > index 948b0c5..23bc691 100644 > --- a/block/qcow.c > +++ b/block/qcow.c > @@ -119,17 +119,19 @@ static int qcow_open(BlockDriverState *bs, QDict > *options, int flags, > if (header.version != QCOW_VERSION) { > char version[64]; > snprintf(version, sizeof(version), "QCOW version %d", > header.version); > - qerror_report(QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, > - bs->device_name, "qcow", version); > + error_set(errp, QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, > + bs->device_name, "qcow", version); > ret = -ENOTSUP; > goto fail; > } > > if (header.size <= 1 || header.cluster_bits < 9) { > + error_setg(errp, "invalid value in qcow header\n");
The convention is not adding "\n" in the end of error messages. > ret = -EINVAL; > goto fail; > } > if (header.crypt_method > QCOW_CRYPT_AES) { > + error_setg(errp, "invalid encryption method in qcow header\n"); Same here. Thanks, Fam