[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 20/44] qom: Use error_reportf_err() instead of g_printerr() in
From: |
Markus Armbruster |
Subject: |
[PATCH v3 20/44] qom: Use error_reportf_err() instead of g_printerr() in examples |
Date: |
Mon, 6 Jul 2020 10:09:26 +0200 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
include/qom/object.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index 94a61ccc3f..b70edd8cd9 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -671,8 +671,7 @@ Object *object_new(const char *typename);
* NULL);
*
* if (!obj) {
- * g_printerr("Cannot create memory backend: %s\n",
- * error_get_pretty(err));
+ * error_reportf_err(err, "Cannot create memory backend: ");
* }
* </programlisting>
* </example>
@@ -739,8 +738,7 @@ void object_apply_compat_props(Object *obj);
* NULL);
*
* if (!obj) {
- * g_printerr("Cannot set properties: %s\n",
- * error_get_pretty(err));
+ * error_reportf_err(err, "Cannot set properties: ");
* }
* </programlisting>
* </example>
--
2.26.2
- Re: [PATCH v3 06/44] qemu-option: Check return value instead of @err where convenient, (continued)
- [PATCH v3 13/44] qemu-option: Use returned bool to check for failure, Markus Armbruster, 2020/07/06
- [PATCH v3 17/44] qapi: Use returned bool to check for failure, Coccinelle part, Markus Armbruster, 2020/07/06
- [PATCH v3 30/44] qdev: Make functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/06
- [PATCH v3 28/44] qom: Use returned bool to check for failure, manual part, Markus Armbruster, 2020/07/06
- [PATCH v3 29/44] qom: Make functions taking Error ** return bool, not 0/-1, Markus Armbruster, 2020/07/06
- [PATCH v3 20/44] qom: Use error_reportf_err() instead of g_printerr() in examples,
Markus Armbruster <=
- [PATCH v3 31/44] qdev: Use returned bool to check for failure, Coccinelle part, Markus Armbruster, 2020/07/06
- [PATCH v3 08/44] qemu-option: Factor out helper find_default_by_name(), Markus Armbruster, 2020/07/06
- [PATCH v3 23/44] qom: Don't handle impossible object_property_get_link() failure, Markus Armbruster, 2020/07/06
- [PATCH v3 38/44] qapi: Smooth another visitor error checking pattern, Markus Armbruster, 2020/07/06
- [PATCH v3 36/44] error: Reduce unnecessary error propagation, Markus Armbruster, 2020/07/06
- [PATCH v3 44/44] hmp: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/06
- [PATCH v3 35/44] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/06
- [PATCH v3 39/44] qapi: Smooth visitor error checking in generated code, Markus Armbruster, 2020/07/06
- [PATCH v3 19/44] s390x/pci: Fix harmless mistake in zpci's property fid's setter, Markus Armbruster, 2020/07/06