On Fri, May 13, 2022 at 9:22 AM Paolo Bonzini wrote:
> The callers only check the return code of vhdx_log_peek_hdr,
> vhdx_log_read_sectors, vhdx_log_write_sectors with ret < 0. But looking
> at the callers:
>
> - vhdx_log_read_desc propagates ret directly from a successful
>
On 5/13/22 01:38, Alberto Faria wrote:
@@ -113,7 +113,7 @@ static ssize_t qcow2_crypto_hdr_read_func(QCryptoBlock
*block, size_t offset,
error_setg_errno(errp, -ret, "Could not read encryption header");
return -1;
}
-return ret;
+return buflen;
}
@@ -174,7
They currently return the value of their 'bytes' parameter on success.
Make them return 0 instead, for consistency with other I/O functions and
in preparation to implement them using generated_co_wrapper. This also
makes it clear that short reads/writes are not possible.
The few callers that