On Wed, Jul 03, 2024 at 01:21:29PM +0300, Manos Pitsidianakis wrote:
> On Thu, 13 Jun 2024 18:44, "Daniel P. Berrangé" <berra...@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é <berra...@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