qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 18/22] qga: don't disable fsfreeze commands if vss_init fa


From: Daniel P . Berrangé
Subject: Re: [PATCH v2 18/22] qga: don't disable fsfreeze commands if vss_init fails
Date: Fri, 12 Jul 2024 13:45:14 +0100
User-agent: Mutt/2.2.12 (2023-09-09)

On Wed, Jul 03, 2024 at 01:21:29PM +0300, Manos Pitsidianakis wrote:
> On Thu, 13 Jun 2024 18:44, "Daniel P. Berrangé" <berrange@redhat.com> wrote:
> > The fsfreeze commands are already written to report an error if
> > vss_init() fails. Reporting a more specific error message is more
> > helpful than a generic "command is disabled" message, which cannot
> > beteween an admin config decision and lack of platform support.
> 
> s/beteween/between
> 
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> > ---
> > qga/commands-win32.c | 18 +++---------------
> > qga/main.c           |  4 ++++
> > 2 files changed, 7 insertions(+), 15 deletions(-)
> > 
> > diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> > index 2533e4c748..5866cc2e3c 100644
> > --- a/qga/commands-win32.c
> > +++ b/qga/commands-win32.c
> > @@ -1203,7 +1203,7 @@ GuestFilesystemInfoList *qmp_guest_get_fsinfo(Error 
> > **errp)
> > GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **errp)
> > {
> >     if (!vss_initialized()) {
> > -        error_setg(errp, QERR_UNSUPPORTED);
> > +        error_setg(errp, "fsfreeze not possible as VSS failed to 
> > initialize");
> >         return 0;
> 
> Should this be return -1 by the way?

This method has to return GuestFsfreezeStatus and
-1 isn't valid. Not a problem though, as the
QAPI code will check for *errp != NULL and not
consider the return value for error detection.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]