1. 10 9月, 2015 1 次提交
  2. 18 2月, 2015 2 次提交
  3. 21 5月, 2014 1 次提交
  4. 09 5月, 2014 1 次提交
  5. 25 4月, 2014 1 次提交
  6. 17 1月, 2014 1 次提交
  7. 15 1月, 2014 1 次提交
  8. 07 1月, 2014 1 次提交
    • P
      error: Add error_abort · 5d24ee70
      Peter Crosthwaite 提交于
      Add a special Error * that can be passed to error handling APIs to
      signal that any errors are fatal and should abort QEMU. There are two
      advantages to this:
      
      - allows for brevity when wishing to assert success of Error **
        accepting APIs. No need for this pattern:
              Error * local_err = NULL;
              api_call(foo, bar, &local_err);
              assert_no_error(local_err);
        This also removes the need for _nofail variants of APIs with
        asserting call sites now reduced to 1LOC.
      - SIGABRT happens from within the offending API. When a fatal error
        occurs in an API call (when the caller is asserting sucess) failure
        often means the API itself is broken. With the abort happening in the
        API call now, the stack frames into the call are available at debug
        time. In the assert_no_error scheme the abort happens after the fact.
      
      The exact semantic is that when an error is raised, if the argument
      Error ** matches &error_abort, then the abort occurs immediately. The
      error messaged is reported.
      
      For error_propagate, if the destination error is &error_abort, then
      the abort happens at propagation time.
      Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      5d24ee70
  9. 28 11月, 2013 1 次提交
  10. 10 9月, 2013 1 次提交
  11. 17 6月, 2013 1 次提交
  12. 13 1月, 2013 1 次提交
  13. 19 12月, 2012 1 次提交
  14. 23 10月, 2012 1 次提交
  15. 14 8月, 2012 8 次提交
  16. 23 7月, 2012 1 次提交
    • P
      qapi: fix error propagation · d195325b
      Paolo Bonzini 提交于
      Don't overwrite / leak previously set errors.
      Make traversal cope with missing mandatory sub-structs.
      Don't try to end a container that could not be started.
      
      v1->v2:
      - unchanged
      
      v2->v3:
      - instead of examining, assert that we never overwrite errors with
        error_set()
      - allow visitors to set a NULL struct pointer successfully, so traversal
        of incomplete objects can continue
      - check for a NULL "obj" before accessing "(*obj)->has_XXX" (this is not a
        typo, "obj != NULL" implies "*obj != NULL" here)
      - fix start_struct / end_struct balance for unions as well
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      d195325b
  17. 20 4月, 2012 1 次提交
  18. 15 3月, 2012 1 次提交
  19. 27 10月, 2011 1 次提交
  20. 04 10月, 2011 1 次提交
  21. 21 8月, 2011 1 次提交
  22. 16 6月, 2011 1 次提交
    • S
      error framework: Fix compilation for w32/w64 · e4ea5e2d
      Stefan Weil 提交于
      The declaration of function error_set() should use macro GCC_FMT_ATTR
      instead of gcc's format printf attribute.
      
      For w32/w64, both declarations are different and GCC_FMT_ATTR is needed.
      Compilation for w64 even failed with the original code because mingw64
      defines a macro for printf.
      
      GCC_FMT_ATTR requires qemu-common.h, so add it in error.c
      (it's also included by error_int.h but too late).
      
      Remove assert.h which is included by qemu-common.h.
      
      Cc: Luiz Capitulino <lcapitulino@redhat.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Weil <weil@mail.berlios.de>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      e4ea5e2d
  23. 08 6月, 2011 1 次提交