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

Re: [libvirt] [PATCH v4 3/4] Implement the core API to suspend/resume the host



On Mon, Nov 28, 2011 at 10:56:33AM -0700, Eric Blake wrote:
> On 11/28/2011 10:46 AM, Srivatsa S. Bhat wrote:
> 
> >>> +    /* Check if the host supports the requested suspend state */
> >>> +    switch (state) {
> >>> +    case VIR_NODE_S3:
> >>> +        if (hostPMFeatures & VIR_NODE_S3) {
> >>> +            cmdString = strdup("pm-suspend");
> >>> +            if (cmdString == NULL) {
> >>> +                virReportOOMError();
> >>> +                goto cleanup;
> >>> +            }
> >>> +            break;
> >>> +        }
> >>> +        goto cleanup;
> >>
> >> Needs to report an error, VIR_ERR_OPERATION_UNSUPPORTED
> >>
> > 
> > 
> > Ok, then I will define VIR_ERR_OPERATION_UNSUPPORTED in
> > src/util/virterror.c and use it, since it is not there at
> > present. And that definition should be in a separate,
> > self-contained patch right?
> 
> Hmm, I think that was probably just a case of Daniel typing by memory
> instead of checking the source, and evidence of how confusing our
> existing error naming is.  Just use the existing
> VIR_ERR_OPERATION_INVALID instead of inventing a new error.

Sorry, I meant

    VIR_ERR_ARGUMENT_UNSUPPORTED = 74,  /* valid API use but unsupported by
                                           the given driver */


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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