[PATCH 8/8] vbox: Stop reporting RC in error messages

Martin Kletzander mkletzan at redhat.com
Tue Jan 24 09:28:29 UTC 2023


On Mon, Jan 23, 2023 at 10:35:55AM +0100, Michal Privoznik wrote:
>As shown in the commit that introduced vboxReportError(), we are
>appending the retval of a failed VirtualBox API onto our error
>messages. Well, this is no longer needed because
>vboxReportError() already appends the VirtualBox error in plain
>text.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/vbox/vbox_common.c | 301 ++++++++++++++++++-----------------------
> 1 file changed, 132 insertions(+), 169 deletions(-)
>
>diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
>index cf404ea9d7..0a83cc5a61 100644
>--- a/src/vbox/vbox_common.c
>+++ b/src/vbox/vbox_common.c
>@@ -570,8 +570,8 @@ vboxSetStorageController(virDomainControllerDef *controller,
>
>     if (NS_FAILED(rc)) {
>         vboxReportError(VIR_ERR_INTERNAL_ERROR,
>-                        _("Failed to add storage controller (name: %s, busType: %d), rc=%08x"),
>-                        debugName, vboxBusType, rc);
>+                        _("Failed to add storage controller (name: %s, busType: %d)"),
>+                        debugName, vboxBusType);
>         goto cleanup;
>     }
>
>@@ -581,7 +581,7 @@ vboxSetStorageController(virDomainControllerDef *controller,
>                                                             vboxModel);
>         if (NS_FAILED(rc)) {
>             vboxReportError(VIR_ERR_INTERNAL_ERROR,

"%s" should be here and without it the build should fail.  I guess
vboxReportError should be added to msg_gen_function in
build-aux/syntax-check.mk.  There are more occurrences of this in the
rest of the patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20230124/7d43f290/attachment-0001.sig>


More information about the libvir-list mailing list