From: Yan Vugenfirer <yvugenfi@redhat.com>
To: Kostiantyn Kostiuk <kkostiuk@redhat.com>
Cc: qemu-devel@nongnu.org, Michael Roth <michael.roth@amd.com>
Subject: Re: [PATCH] qga-vss: Exit with non-zero code when register fail
Date: Fri, 20 Jun 2025 16:29:12 +0400 [thread overview]
Message-ID: <CAGoVJZw0-ShHSc3cLkO4tcUjAwifOFksWLF3mFmX-x3bWk5oVg@mail.gmail.com> (raw)
In-Reply-To: <20250620083132.28347-1-kkostiuk@redhat.com>
On Fri, Jun 20, 2025 at 12:33 PM Kostiantyn Kostiuk <kkostiuk@redhat.com> wrote:
>
> QGA installer uses rundll32 to run the DLLCOMRegister function
> from qga-vss.dll and perform VSS provider registration.
> rundll32 ignores the return value of the function and always
> exits with a zero exit code. This causes a situation where
> the installer does not know the status of VSS provider registration.
>
> This commit forces to change exit code when the VSS provider
> registration fails.
>
> https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/rundll32
>
> Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
> ---
> qga/vss-win32/install.cpp | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp
> index 5cea5bcf74..6ee2f44a10 100644
> --- a/qga/vss-win32/install.cpp
> +++ b/qga/vss-win32/install.cpp
> @@ -385,7 +385,10 @@ out:
> STDAPI_(void) CALLBACK DLLCOMRegister(HWND, HINSTANCE, LPSTR, int);
> STDAPI_(void) CALLBACK DLLCOMRegister(HWND, HINSTANCE, LPSTR, int)
> {
> - COMRegister();
> + HRESULT hr = COMRegister();
> + if (FAILED(hr)) {
> + exit(hr);
> + }
> }
>
> STDAPI_(void) CALLBACK DLLCOMUnregister(HWND, HINSTANCE, LPSTR, int);
> --
> 2.48.1
>
>
Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com>
next prev parent reply other threads:[~2025-06-20 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 8:31 [PATCH] qga-vss: Exit with non-zero code when register fail Kostiantyn Kostiuk
2025-06-20 12:29 ` Yan Vugenfirer [this message]
2025-06-26 7:45 ` Dehan Meng
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=CAGoVJZw0-ShHSc3cLkO4tcUjAwifOFksWLF3mFmX-x3bWk5oVg@mail.gmail.com \
--to=yvugenfi@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=michael.roth@amd.com \
--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).