Re: [Qemu-devel] Adding errno to QMP errors

2012-06-19 Thread Luiz Capitulino
On Mon, 18 Jun 2012 13:31:52 -0500 Anthony Liguori wrote: > >> Are any users of QMP actually asking for this kind of advanced > >> error reporting ? From libvirt's POV we're perfectly content > >> with just an error class& string. > > > > Real users, please, not theoretical ones. > > Irrespect

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-19 Thread Kevin Wolf
Am 19.06.2012 11:20, schrieb Daniel P. Berrange: > On Tue, Jun 19, 2012 at 09:39:34AM +0200, Kevin Wolf wrote: >> Am 18.06.2012 20:31, schrieb Anthony Liguori: >>> Irrespective of anything else, I think it's safe to say the experiment of >>> "rich >>> errors" has been a failure. We still have wa

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-19 Thread Daniel P. Berrange
On Tue, Jun 19, 2012 at 09:39:34AM +0200, Kevin Wolf wrote: > Am 18.06.2012 20:31, schrieb Anthony Liguori: > > Irrespective of anything else, I think it's safe to say the experiment of > > "rich > > errors" has been a failure. We still have way too many places using > > error_report. > > > >

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-19 Thread Kevin Wolf
Am 18.06.2012 20:31, schrieb Anthony Liguori: > Irrespective of anything else, I think it's safe to say the experiment of > "rich > errors" has been a failure. We still have way too many places using > error_report. > > As I mentioned in another thread, I think we should: > > 1) Introduce a G

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-18 Thread Anthony Liguori
On 06/18/2012 10:41 AM, Markus Armbruster wrote: "Daniel P. Berrange" writes: On Fri, Jun 15, 2012 at 11:52:57AM -0500, Anthony Liguori wrote: On 06/13/2012 12:49 PM, Luiz Capitulino wrote: No, you're confusing things I think. { 'error': 'NoSpace' } is bad. errno is not an intrinsically bad

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-18 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Fri, Jun 15, 2012 at 11:52:57AM -0500, Anthony Liguori wrote: >> On 06/13/2012 12:49 PM, Luiz Capitulino wrote: >> No, you're confusing things I think. { 'error': 'NoSpace' } is bad. >> errno is not an intrinsically bad thing but errno critically relies >> on th

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Paolo Bonzini
Il 15/06/2012 19:48, Anthony Liguori ha scritto: >> So I guess we can proceed with errno values, yuppy! > > Yes, but I reserve the right to nack abuses :-) I will help, don't worry. Paolo

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Anthony Liguori
On 06/15/2012 11:55 AM, Paolo Bonzini wrote: Il 15/06/2012 18:52, Anthony Liguori ha scritto: Having an error like: { 'error': 'OpenFileFailed', 'file': 'filename', 'mode': 'r/w', 'os_error': 'enospc' } is actually pretty reasonable for something like a memory dump command where the user speci

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Kevin Wolf
Am 15.06.2012 19:02, schrieb Luiz Capitulino: > On Fri, 15 Jun 2012 11:52:57 -0500 > Anthony Liguori wrote: > >> On 06/13/2012 12:49 PM, Luiz Capitulino wrote: >>> On Thu, 31 May 2012 16:54:47 +0200 >>> Paolo Bonzini wrote: >>> Wait, I think you're conflating two things. One is "d

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Daniel P. Berrange
On Fri, Jun 15, 2012 at 11:52:57AM -0500, Anthony Liguori wrote: > On 06/13/2012 12:49 PM, Luiz Capitulino wrote: > No, you're confusing things I think. { 'error': 'NoSpace' } is bad. > errno is not an intrinsically bad thing but errno critically relies > on the *caller* to understand the context

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Luiz Capitulino
On Fri, 15 Jun 2012 11:52:57 -0500 Anthony Liguori wrote: > On 06/13/2012 12:49 PM, Luiz Capitulino wrote: > > On Thu, 31 May 2012 16:54:47 +0200 > > Paolo Bonzini wrote: > > > >> Wait, I think you're conflating two things. > >> > >> One is "do not shoehorn errors into errno values". So for QOM

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Paolo Bonzini
Il 15/06/2012 18:52, Anthony Liguori ha scritto: > Having an error like: > > { 'error': 'OpenFileFailed', 'file': 'filename', 'mode': 'r/w', > 'os_error': 'enospc' } > > is actually pretty reasonable for something like a memory dump command > where the user specifies a file. > > OTOH, for someth

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Anthony Liguori
On 06/13/2012 12:49 PM, Luiz Capitulino wrote: On Thu, 31 May 2012 16:54:47 +0200 Paolo Bonzini wrote: Wait, I think you're conflating two things. One is "do not shoehorn errors into errno values". So for QOM invalid values we have PropertyValueBad, not a generic InvalidArgument value. We c

Re: [Qemu-devel] Adding errno to QMP errors

2012-06-15 Thread Luiz Capitulino
On Wed, 13 Jun 2012 14:49:10 -0300 Luiz Capitulino wrote: > On Thu, 31 May 2012 16:54:47 +0200 > Paolo Bonzini wrote: > > > Wait, I think you're conflating two things. > > > > One is "do not shoehorn errors into errno values". So for QOM invalid > > values we > > have PropertyValueBad, not a

[Qemu-devel] Adding errno to QMP errors

2012-06-13 Thread Luiz Capitulino
On Thu, 31 May 2012 16:54:47 +0200 Paolo Bonzini wrote: > Wait, I think you're conflating two things. > > One is "do not shoehorn errors into errno values". So for QOM invalid values > we > have PropertyValueBad, not a generic InvalidArgument value. We convert > everything > to Error rather