libxc: Have xc_translate_foreign_address() set errno properly
authorRazvan Cojocaru <rcojocaru@bitdefender.com>
Thu, 3 Mar 2016 13:58:00 +0000 (15:58 +0200)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 16 Mar 2016 08:58:39 +0000 (04:58 -0400)
commit80c4b4c1785aab8053a27931c188c4311189d32d
tree9daf31bfef05d2a696c15976acce195674a9529b
parentefc904263f483026672a5cdf3ccf9be8c4fdaa31
libxc: Have xc_translate_foreign_address() set errno properly

Currently it's possible for xc_translate_foreign_address() to fail
and errno still be set to success. This patch fixes the issue.
Based on the first half of Don Slutz' patch:
http://lists.xen.org/archives/html/xen-devel/2014-03/msg03720.html

Signed-off-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_pagetab.c