On Fri, Oct 30, 2009 at 06:33:15PM +0100, Paolo Bonzini wrote:
> On 10/30/2009 06:15 PM, Daniel P. Berrange wrote:
>> If we're going to use JSON we should be 100% compliant with the JSON
>> spec, not extend it. By adding custom QEMU extensions, we loose the
>> ability for programming language to tr
Jamie Lokier wrote:
Anthony Liguori wrote:
Jamie Lokier wrote:
Anthony Liguori wrote:
Okay, let's get more clever then and do:
#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
By the way, since you've already invented a non-standard JSON
extension, which is
On 10/30/2009 07:09 PM, Jamie Lokier wrote:
Anthony Liguori wrote:
Jamie Lokier wrote:
Anthony Liguori wrote:
Okay, let's get more clever then and do:
#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
By the way, since you've already invented a non-standard JSON
extension, which is the
Anthony Liguori wrote:
> Jamie Lokier wrote:
> >Anthony Liguori wrote:
> >
> >>Okay, let's get more clever then and do:
> >>
> >>#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
> >>
> >
> >By the way, since you've already invented a non-standard JSON
> >extension, which is the single quo
Paolo Bonzini wrote:
On 10/30/2009 06:15 PM, Daniel P. Berrange wrote:
If we're going to use JSON we should be 100% compliant with the JSON
spec, not extend it. By adding custom QEMU extensions, we loose the
ability for programming language to trivially talk to QEMU using a
standard JSON parser,
Jamie Lokier wrote:
Anthony Liguori wrote:
Okay, let's get more clever then and do:
#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
By the way, since you've already invented a non-standard JSON
extension, which is the single quotes, why not go a step further and
permit the quotes
On 10/30/2009 06:15 PM, Daniel P. Berrange wrote:
If we're going to use JSON we should be 100% compliant with the JSON
spec, not extend it. By adding custom QEMU extensions, we loose the
ability for programming language to trivially talk to QEMU using a
standard JSON parser, and instead everyone
On Fri, Oct 30, 2009 at 04:28:49PM +, Jamie Lokier wrote:
> Anthony Liguori wrote:
> > Okay, let's get more clever then and do:
> >
> > #define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
>
> By the way, since you've already invented a non-standard JSON
> extension, which is the single quote
On 10/30/2009 05:28 PM, Jamie Lokier wrote:
By the way, since you've already invented a non-standard JSON
extension, which is the single quotes, why not go a step further and
permit the quotes to be omitted for simple tokens?
#define QERR_DEV_NFOUND "{ code: 404, name: %s}"
Much neater, IMHO.
Anthony Liguori wrote:
> Okay, let's get more clever then and do:
>
> #define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
By the way, since you've already invented a non-standard JSON
extension, which is the single quotes, why not go a step further and
permit the quotes to be omitted for simple
On Fri, 30 Oct 2009 08:59:43 -0500
Anthony Liguori wrote:
> Luiz Capitulino wrote:
> > Seems ok to me, but to make it harder to reuse existing error
> > codes we'd have to:
> >
> > 1. Make mandatory the use of a macro in the qemu_error_structed()
> >call
> > 2. All macros would have to be de
Luiz Capitulino wrote:
Seems ok to me, but to make it harder to reuse existing error
codes we'd have to:
1. Make mandatory the use of a macro in the qemu_error_structed()
call
2. All macros would have to be defined in qerror.h
Not really. All you need is to switch code to something tha
(Added Daniel Berrange to the CC list)
On Fri, 30 Oct 2009 08:09:02 -0500
Anthony Liguori wrote:
> Gerd Hoffmann wrote:
> > On 10/30/09 13:28, Luiz Capitulino wrote:
> -qemu_error("Device \"%s\" not found. Try -device '?' for
> a list.\n",
> - driver)
On 10/30/2009 02:09 PM, Anthony Liguori wrote:
Okay, let's get more clever then and do:
#define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"
So we can do:
qemu_error_structured(QERR_DEV_NFOUND, driver);
Such that we still get printf style parameter checking.
That's clever indeed. :-) But
Gerd Hoffmann wrote:
On 10/30/09 13:28, Luiz Capitulino wrote:
-qemu_error("Device \"%s\" not found. Try -device '?' for
a list.\n",
- driver);
+qemu_error_structed(QERR_DEV_NFOUND, "{ 'name': %s }",
driver);
why not store the "{ 'name': %s }" in the qerror
On 10/30/09 13:28, Luiz Capitulino wrote:
-qemu_error("Device \"%s\" not found. Try -device '?' for a list.\n",
- driver);
+qemu_error_structed(QERR_DEV_NFOUND, "{ 'name': %s }", driver);
why not store the "{ 'name': %s }" in the qerror_table? I guess you
pla
On Thu, 29 Oct 2009 23:12:10 +0100
Paolo Bonzini wrote:
> > A last note: this series is on top of the (to be merged) QJSon module,
> > that's why it's a RFC and.. I didn't test it too much. :)
>
> I have just two comments:
>
> 1) you do
>
> > -qemu_error("Device \"%s\" not found. Tr
A last note: this series is on top of the (to be merged) QJSon module,
that's why it's a RFC and.. I didn't test it too much. :)
I have just two comments:
1) you do
-qemu_error("Device \"%s\" not found. Try -device '?' for a list.\n",
- driver);
+qemu_erro
18 matches
Mail list logo