From: Thomas Huth <thuth@redhat.com>
To: Konstantin Kostiuk <kkostiuk@redhat.com>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v4 2/4] QGA VSS: Replace 'fprintf(stderr' with PRINT_DEBUG
Date: Mon, 10 Jul 2023 10:00:04 +0200 [thread overview]
Message-ID: <664eb456-d812-a5e2-4470-534777d0fda4@redhat.com> (raw)
In-Reply-To: <20230710074639.996030-3-kkostiuk@redhat.com>
On 10/07/2023 09.46, Konstantin Kostiuk wrote:
> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
> qga/vss-win32/install.cpp | 12 ++++++------
> qga/vss-win32/requester.cpp | 9 +++++----
> 2 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp
> index ff93b08a9e..9bd2c52b70 100644
> --- a/qga/vss-win32/install.cpp
> +++ b/qga/vss-win32/install.cpp
> @@ -13,6 +13,7 @@
> #include "qemu/osdep.h"
>
> #include "vss-common.h"
> +#include "vss-debug.h"
> #ifdef HAVE_VSS_SDK
> #include <vscoordint.h>
> #else
> @@ -54,7 +55,7 @@ void errmsg(DWORD err, const char *text)
> FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
> NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
> (char *)&msg, 0, NULL);
> - fprintf(stderr, "%.*s. (Error: %lx) %s\n", len, text, err, msg);
> + qga_debug("%.*s. (Error: %lx) %s\n", len, text, err, msg);
Here you kept the "\n" at the end of the string...
> LocalFree(msg);
> }
>
> @@ -219,7 +220,7 @@ static HRESULT QGAProviderRemove(ICatalogCollection *coll, int i, void *arg)
> {
> HRESULT hr;
>
> - fprintf(stderr, "Removing COM+ Application: %s\n", QGA_PROVIDER_NAME);
> + qga_debug("Removing COM+ Application: %s", QGA_PROVIDER_NAME);
> chk(coll->Remove(i));
> out:
> return hr;
> @@ -304,9 +305,8 @@ STDAPI COMRegister(void)
> }
> strcpy(tlbPath, dllPath);
> strcpy(tlbPath+n-3, "tlb");
> - fprintf(stderr, "Registering " QGA_PROVIDER_NAME ":\n");
> - fprintf(stderr, " %s\n", dllPath);
> - fprintf(stderr, " %s\n", tlbPath);
> + qga_debug("Registering " QGA_PROVIDER_NAME ": %s %s",
> + dllPath, tlbPath);
... but here you remove the "\n" ... looks weird. Looking at the first
patch, I assume the "\n" should now always be removed from the strings here?
Thomas
next prev parent reply other threads:[~2023-07-10 8:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 7:46 [PATCH v4 0/4] QGA VSS Logging Konstantin Kostiuk
2023-07-10 7:46 ` [PATCH v4 1/4] QGA VSS: Add wrapper to send log to debugger and stderr Konstantin Kostiuk
2023-07-10 7:46 ` [PATCH v4 2/4] QGA VSS: Replace 'fprintf(stderr' with PRINT_DEBUG Konstantin Kostiuk
2023-07-10 8:00 ` Thomas Huth [this message]
2023-07-10 8:03 ` Konstantin Kostiuk
2023-07-10 7:46 ` [PATCH v4 3/4] QGA VSS: Print error in err_set Konstantin Kostiuk
2023-07-10 8:07 ` Thomas Huth
2023-07-10 7:46 ` [PATCH v4 4/4] QGA VSS: Add log in functions begin/end Konstantin Kostiuk
2023-07-10 8:10 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=664eb456-d812-a5e2-4470-534777d0fda4@redhat.com \
--to=thuth@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=michael.roth@amd.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).