- 10 9月, 2015 1 次提交
-
-
由 Markus Armbruster 提交于
Duplicated when commit 680d16dc added error_set_errno(), and again when commit 20840d4c added error_set_win32(). Make the original copy in error_set() reusable by factoring out error_setv(), then rewrite error_set_errno() and error_set_win32() on top of it. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 18 2月, 2015 2 次提交
-
-
由 Markus Armbruster 提交于
Coccinelle semantic patch: @@ expression E; @@ - error_report("%s", error_get_pretty(E)); - error_free(E); + error_report_err(E); @@ expression E, S; @@ - error_report("%s", error_get_pretty(E)); + error_report_err(E); ( exit(S); | abort(); ) Trivial manual touch-ups in block/sheepdog.c. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Markus Armbruster 提交于
I've typed error_report("%s", error_get_pretty(ERR)) too many times already, and I've fixed too many instances of qerror_report_err(ERR) to error_report("%s", error_get_pretty(ERR)) as well. Capture the pattern in a convenience function. Since it's almost invariably followed by error_free(), stuff that into the convenience function as well. The next patch will put it to use. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 21 5月, 2014 1 次提交
-
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
- 09 5月, 2014 1 次提交
-
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 25 4月, 2014 1 次提交
-
-
由 Cole Robinson 提交于
Makes it a bit clear how the interdependencies work. Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 17 1月, 2014 1 次提交
-
-
由 Peter Crosthwaite 提交于
This reverts commit d32934c8. The original implementation before this patch makes abortive error messages much more friendly. The underlying bug that required this change is now fixed. Revert. Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
- 15 1月, 2014 1 次提交
-
-
由 Peter Crosthwaite 提交于
Use fprintf(stderr instead. This removes dependency of libqemuutil.a on the monitor. We can further justify this change, in that this code path should only trigger under a fatal error condition. fprintf-stderr is probably the appropriate medium as under a fatal error conidition the monitor itself may be down and out for the count. So assertion failure messages should go lowest common denominator - straight to stderr. Fixes the build as reported by Kevin Wolf. Issue debugged and change suggested by Luiz Capitulino. Issue introduced by 5d24ee70. Signed-off-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@xilinx.com>
-
- 07 1月, 2014 1 次提交
-
-
由 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>
-
- 28 11月, 2013 1 次提交
-
-
由 Max Reitz 提交于
There may be calls to error_setg() and especially error_setg_errno() which blindly (and until now wrongly) assume these functions not to clobber errno (e.g., they pass errno to error_setg_errno() and return -errno afterwards). Instead of trying to find and fix all of these constructs, just make sure error_setg() and error_setg_errno() indeed do not clobber errno. Suggested-by: NEric Blake <eblake@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 10 9月, 2013 1 次提交
-
-
由 Tomoki Sekiyama 提交于
These functions help maintaining homogeneous formatting of error messages with Windows error code and description (generated by g_win32_error_message()). Signed-off-by: NTomoki Sekiyama <tomoki.sekiyama@hds.com> Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
-
- 17 6月, 2013 1 次提交
-
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Acked-by: NKevin Wolf <kwolf@redhat.com>
-
- 13 1月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 19 12月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 23 10月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
These functions help maintaining homogeneous formatting of error messages that include strerror values. Acked-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 14 8月, 2012 8 次提交
-
-
由 Luiz Capitulino 提交于
Used to store error information, but it's unused now. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
This commit changes all QERR_ macros to contain a human message (ie. the desc string found in qerr_table[]) instead of a json dictionary in string format. Before this commit, error_set() and qerror_report() would receive a json dictionary in string format and build a qobject from it. Now, both function receive a human message instead and the qobject is not built anymore. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
error_get_qobject() is unused since last commit, error_set_qobject() has never been used. Also drops error_int.h. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
Besides being unused, they operate on the current error format, which is going to be replaced soon. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
The new argument is added to functions qerror_report() and error_set(). It's stored in Error and QError. qerror_report_err() is also updated to take care of it. The QERR_ macros are changed to contain a place holder value for the new argument, so that the value is used on all current calls to qerror_report() and error_set() (and also to initialize qerror_table[]). Next commit will update the QERR_ macros with a proper ErrorClass value. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
Today, the error message is only constructed when it's used. This commit changes that to construct the error message when the error object is built (ie. when the error is reported). This simplifies the Error object. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
由 Luiz Capitulino 提交于
Simplifies current and future users. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
-
- 23 7月, 2012 1 次提交
-
-
由 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>
-
- 20 4月, 2012 1 次提交
-
-
由 Amos Kong 提交于
It is invalid to return a value from a function returning void. [C99 6.8.6.4 says "A return statement with an expression shall not appear in a function whose return type is void" but gcc 4.6.3 with QEMU compile flags does not complain. It's still worth fixing this. Stefan] Signed-off-by: NAmos Kong <akong@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 15 3月, 2012 1 次提交
-
-
由 Luiz Capitulino 提交于
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 27 10月, 2011 1 次提交
-
-
由 Luiz Capitulino 提交于
Previous commits dropped most qobjects usage from qemu modules (now they are a low level interface used by the QAPI). However, some modules still include the qemu-objects.h header file. This commit drops qemu-objects.h from some of those modules and includes qjson.h instead, which is what they actually need. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 04 10月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
Reported-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
-
- 21 8月, 2011 1 次提交
-
-
由 Anthony Liguori 提交于
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 16 6月, 2011 1 次提交
-
-
由 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>
-
- 08 6月, 2011 1 次提交
-
-
由 Luiz Capitulino 提交于
New error-handling framework that allows for exception-like error propagation. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-