On 01/09/2017 09:39 AM, Daniel P. Berrange wrote: > Currently when a task fails, the error is never explicitly > associated with the task object, it is just passed along > through the completion callback. This adds the ability to > explicitly associate an error with the task. > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > --- > include/io/task.h | 32 ++++++++++++++++++++++++++++++++ > io/task.c | 23 +++++++++++++++++++++++ > 2 files changed, 55 insertions(+) >
> /** > + * qio_task_set_error: > + * @task: the task struct > + * @err: pointer to the error, or NULL > + * > + * Associate an error with the task, which can later > + * be retrieved with the qio_task_propagate_error() > + * method. This method takes ownership of @err, so > + * it is not valid to access it after this call > + * completes. If @err is NULL this is a no-op. If > + * this is call multiple times, only the first s/call/called/ > + * provided @err will be recorded, later ones will > + * be discarded and freed. > + */ With the typo fix, Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature