qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
  • * [Qemu-devel] Adding errno to QMP errors
           [not found]           ` <4FC78637.4040605@redhat.com>
           [not found]             ` <20120531124411.659ed161@doriath.home>
    @ 2012-06-13 17:49             ` Luiz Capitulino
      2012-06-15 14:46               ` Luiz Capitulino
      2012-06-15 16:52               ` Anthony Liguori
      1 sibling, 2 replies; 26+ messages in thread
    From: Luiz Capitulino @ 2012-06-13 17:49 UTC (permalink / raw)
      To: aliguori; +Cc: Kevin Wolf, Paolo Bonzini, qemu-devel, armbru
    
    On Thu, 31 May 2012 16:54:47 +0200
    Paolo Bonzini <pbonzini@redhat.com> 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 than returning negative errno values and then returning generic
    > error codes, because those would be ugly and non-descriptive.  I agree with that.
    > 
    > The other is "when errors come straight from the OS, _do_ use errno values".
    > This is for OpenFileFailed, for the new socket errors and so on.  This is what
    > I am proposing.
    
    [...]
    
    >     $ echo | sed p > /dev/full
    >     sed: couldn't flush stdout: No space left on device
    >          ^^^^^^^^^^^^^^                                 error type
    >                         ^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^ arguments
    > 
    > That would become, in JSON:
    > 
    >     { 'error': 'FlushFailed',
    >       'file': 'stdout',
    >       'os_error': 'enospc' }
    
    This is not a new discussion and what we're doing today is to return errno
    as a QError class name. So, for the example above we'd return something like:
    
     { 'error': 'NoSpace' }
    
    It's possible to add new optional values if you need more information, but
    I know that that's not what you're asking.
    
    I mostly agree that your version would be better, the only problem I see
    is that this is probably going to mess a bit more our API as we have been
    doing like my example above for some time.
    
    Anthony, the current design was mostly influenced by you and you had
    objections on doing what Paolo and Kevin are suggesting. What do you think?
    
    ^ permalink raw reply	[flat|nested] 26+ messages in thread
  • * [Qemu-devel] [PATCH qmp-next 00/14]: qapi: convert screendump
    @ 2012-05-25 19:41 Luiz Capitulino
      2012-05-25 19:41 ` [Qemu-devel] [PATCH 02/14] qerror: add new errors Luiz Capitulino
      0 siblings, 1 reply; 26+ messages in thread
    From: Luiz Capitulino @ 2012-05-25 19:41 UTC (permalink / raw)
      To: qemu-devel; +Cc: aliguori, alevy, armbru
    
    Converting the screendump command is simple and shouldn't take more than
    or or two patches, the complicated part is to report all errors correctly.
    
    I hope I didn't go too far there, but at least this series does the right
    thing (or is very near to).
    
     console.c        |   7 ++--
     console.h        |   5 +--
     cutils.c         | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
     hmp-commands.hx  |   5 ++-
     hmp.c            |   9 +++++
     hmp.h            |   1 +
     hw/blizzard.c    |   4 +--
     hw/g364fb.c      |  51 ++++++++++++++++++++--------
     hw/omap_lcdc.c   |  60 +++++++++++++++++++++++----------
     hw/qxl.c         |   7 ++--
     hw/tcx.c         |  96 ++++++++++++++++++++++++++++++++++++++++------------
     hw/vga.c         |  38 +++++++++++++--------
     hw/vga_int.h     |   3 +-
     hw/vmware_vga.c  |   7 ++--
     monitor.c        |   6 ----
     qapi-schema.json |  24 +++++++++++++
     qemu-common.h    |   7 ++++
     qerror.c         |  28 ++++++++++++++--
     qerror.h         |  22 ++++++++++--
     qmp-commands.hx  |   5 +--
     20 files changed, 390 insertions(+), 95 deletions(-)
    
    ^ permalink raw reply	[flat|nested] 26+ messages in thread

    end of thread, other threads:[~2012-07-02 13:47 UTC | newest]
    
    Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1338387301-10074-1-git-send-email-lcapitulino@redhat.com>
         [not found] ` <1338387301-10074-3-git-send-email-lcapitulino@redhat.com>
         [not found]   ` <4FC74B1A.8080700@redhat.com>
         [not found]     ` <20120531110608.4dc3fe22@doriath.home>
         [not found]       ` <4FC77F6C.8000008@redhat.com>
         [not found]         ` <20120531113127.1c8aa213@doriath.home>
         [not found]           ` <4FC78637.4040605@redhat.com>
         [not found]             ` <20120531124411.659ed161@doriath.home>
         [not found]               ` <4FC79316.6080603@redhat.com>
         [not found]                 ` <20120531130814.5779aae9@doriath.home>
    2012-06-01 12:40                   ` [Qemu-devel] [PATCH 02/14] qerror: add new errors Kevin Wolf
    2012-06-13 17:49             ` [Qemu-devel] Adding errno to QMP errors Luiz Capitulino
    2012-06-15 14:46               ` Luiz Capitulino
    2012-06-15 16:52               ` Anthony Liguori
    2012-06-15 16:55                 ` Paolo Bonzini
    2012-06-15 17:48                   ` Anthony Liguori
    2012-06-15 19:11                     ` Paolo Bonzini
    2012-06-15 17:02                 ` Luiz Capitulino
    2012-06-15 17:23                   ` Kevin Wolf
    2012-06-15 17:03                 ` Daniel P. Berrange
    2012-06-18 15:41                   ` Markus Armbruster
    2012-06-18 18:31                     ` Anthony Liguori
    2012-06-19  7:39                       ` Kevin Wolf
    2012-06-19  9:20                         ` Daniel P. Berrange
    2012-06-19  9:31                           ` Kevin Wolf
    2012-06-19 13:12                       ` Luiz Capitulino
    2012-06-20 17:48                         ` [Qemu-devel] [RFC] Fixing the error failure Luiz Capitulino
    2012-06-20 18:46                           ` Anthony Liguori
    2012-06-20 19:40                             ` Luiz Capitulino
    2012-06-20 19:47                               ` Anthony Liguori
    2012-06-20 20:13                                 ` Luiz Capitulino
    2012-06-21 12:42                           ` Daniel P. Berrange
         [not found]                             ` <20120625165651.31f9e0bd@doriath.home>
         [not found]                               ` <m34npyld8y.fsf@blackfin.pond.sub.org>
         [not found]                                 ` <20120626093511.GD14451@redhat.com>
         [not found]                                   ` <m3hatyco9g.fsf@blackfin.pond.sub.org>
         [not found]                                     ` <4FE9E275.40303@codemonkey.ws>
         [not found]                                       ` <m3txxvq3i3.fsf@blackfin.pond.sub.org>
    2012-07-02 12:47                                         ` Anthony Liguori
    2012-07-02 13:47                                           ` Luiz Capitulino
    2012-07-02  8:03                           ` Paolo Bonzini
    2012-05-25 19:41 [Qemu-devel] [PATCH qmp-next 00/14]: qapi: convert screendump Luiz Capitulino
    2012-05-25 19:41 ` [Qemu-devel] [PATCH 02/14] qerror: add new errors Luiz Capitulino
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).