qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 6/9] QError: Add qdev not found error


From: Hollis Blanchard
Subject: Re: [Qemu-devel] [PATCH 6/9] QError: Add qdev not found error
Date: Thu, 15 Oct 2009 11:13:53 -0700

On Thu, 2009-10-15 at 14:52 -0300, Luiz Capitulino wrote:
> 
> > You could easily have
> >       qemu_error(code, "device not found");
> 
>  This doesn't solve the problems I mentioned above, besides I don't
> see why you need to specify both, the error code and the description,
> they describe the same thing.

This is how FTP and other protocols work, for example.

You supplied a perfect example:
        qemu_error(404, "husb: host usb device %d.%d is already open\n",
                      bus_num, addr);

In this case, an interactive client could only display the "pretty"
text.

A machine client would interpret the code as Markus described in a
previous mail (temporary server error, permanent server error, etc). In
case of a permanent server error, the client could *also* pass through
the pretty text to display to the user.

>  Also, they must not change after the protocol gets into production,
> having them defined in the same place will help.

This seems really unnecessary and too much abstraction.

Aside from that, we should certainly be able to change the pretty text,
for example, to provide additional clarification to the user. The
machine-interpreted code, on the other hand, wouldn't change.

-- 
Hollis Blanchard
IBM Linux Technology Center





reply via email to

[Prev in Thread] Current Thread [Next in Thread]