libxc: save/restore error handling fixes
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 28 May 2010 08:37:42 +0000 (09:37 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 28 May 2010 08:37:42 +0000 (09:37 +0100)
commit861aef6e1558bebad8fc60c1c723f0706fd3ed87
tree7d59668d4da97439597470f4ad52f8e630ee932e
parentb140baacc3f44286593c232c1df61f6b1b3ad52f
libxc: save/restore error handling fixes

* Make "read_exact" in libxc always set errno.
* Rename "read_exact" macro in xc_domain_restore.c (which shadows
  real function) to RDEXACT and change all callers.
* Make RDEXACT anamorphically use xch for error reporting rather than
* stderr.
* Call PERROR rather than ERROR when appropriate, so that log messages
  include errno.
* Save errno in noncached_write so that its errno value is always
* right.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxc/xc_domain_restore.c
tools/libxc/xc_domain_save.c
tools/libxc/xc_private.c
tools/libxc/xc_private.h