]> xenbits.xensource.com Git - people/royger/xen.git/commit
tools/libxc: pass errno to callers of xc_domain_save
authorOlaf Hering <olaf@aepfle.de>
Tue, 11 Mar 2014 09:30:50 +0000 (10:30 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 11 Mar 2014 11:37:10 +0000 (11:37 +0000)
commitdda0b77d2caad8c3997e972cf96e40d0a67329ea
treee2079caa7cd2e3e7294fcc6e8f8f4049a32333b6
parentd1eac8d14ecf6c76a355b461dac208d53a6b15e3
tools/libxc: pass errno to callers of xc_domain_save

Callers of xc_domain_save use errno to print diagnostics if the call
fails. But xc_domain_save does not preserve the actual errno in case of
a failure.

This change preserves errno in all cases where code jumps to the label
"out". In addition a new label "exit" is added to catch also code which
used to do just "return 1".

Now libxl_save_helper:complete can print the actual error string.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_domain_save.c