[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC Patch v4 7/9] correct xc_domain_save()'s return value
On 09/22/2014 03:46 PM, Olaf Hering wrote: > On Mon, Sep 22, Wen Congyang wrote: > >> On 09/22/2014 03:30 PM, Olaf Hering wrote: >>> On Mon, Sep 22, Wen Congyang wrote: >>> >>>> if ( !(*suspend)(data) ) >>>> { >>>> ERROR("Suspend request failed"); >>>> + errno = errno ? : -1; >>> >>> -1 is not a valid value for errno, it should be ESOMETHING. >> >> But, we don't know what's wrong, so I don't know which ESOMETHING is >> OK here... > > The called function has to set errno. If it doesnt do that today, fix > the callbacks. The callbacks may be implemented in libxl, which is another process. xc_domain_save() is a public API, and the caller may forget to set the errno... So we cannot assume that the callbacks has set the errno Thanks Wen Congyang > > Olaf > . > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |