qemu-io: add cvtnum() error handling for zone commands
cvtnum() parses positive int64_t values and returns a negative errno on failure. Print errors and return early when cvtnum() fails. While we're at it, also reject nr_zones values greater or equal to 2^32 since they cannot be represented. Reported-by:Peter Maydell <peter.maydell@linaro.org> Cc: Sam Li <faithilikerun@gmail.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20240507180558.377233-1-stefanha@redhat.com> Reviewed-by:
Sam Li <faithilikerun@gmail.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
parent
e669e800
Please register or sign in to comment