Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed()

2012-04-24 Thread Eric Blake
On 04/24/2012 03:01 AM, Paolo Bonzini wrote: > Il 24/04/2012 10:49, Stefan Hajnoczi ha scritto: >> "The error is specific to >> block job speeds so we can add a speed argument to block-stream in the >> future and clearly identify the invalid parameter." >> >> I added the new error to avoid having t

Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed()

2012-04-24 Thread Paolo Bonzini
Il 24/04/2012 10:49, Stefan Hajnoczi ha scritto: > "The error is specific to > block job speeds so we can add a speed argument to block-stream in the > future and clearly identify the invalid parameter." > > I added the new error to avoid having to change the InvalidParameter > 'name' field. It b

Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed()

2012-04-24 Thread Stefan Hajnoczi
On Mon, Apr 23, 2012 at 7:01 PM, Luiz Capitulino wrote: > On Mon, 23 Apr 2012 17:47:09 +0200 > Paolo Bonzini wrote: > >> Il 23/04/2012 17:39, Stefan Hajnoczi ha scritto: >> > There are at least two different errors that can occur in >> > block_job_set_speed(): the job might not support setting sp

Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed()

2012-04-23 Thread Luiz Capitulino
On Mon, 23 Apr 2012 17:47:09 +0200 Paolo Bonzini wrote: > Il 23/04/2012 17:39, Stefan Hajnoczi ha scritto: > > There are at least two different errors that can occur in > > block_job_set_speed(): the job might not support setting speeds or the > > value might be invalid. > > > > Use the Error me

[Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed()

2012-04-23 Thread Stefan Hajnoczi
There are at least two different errors that can occur in block_job_set_speed(): the job might not support setting speeds or the value might be invalid. Use the Error mechanism to report the error where it occurs. This patch adds the new BlockJobSpeedInvalid QError. The error is specific to bloc

Re: [Qemu-devel] [PATCH 2/4] block: use Error mechanism instead of -errno for block_job_set_speed()

2012-04-23 Thread Paolo Bonzini
Il 23/04/2012 17:39, Stefan Hajnoczi ha scritto: > There are at least two different errors that can occur in > block_job_set_speed(): the job might not support setting speeds or the > value might be invalid. > > Use the Error mechanism to report the error where it occurs. This patch > adds the ne