aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_core.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-12-08 11:57:06 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-12-08 11:57:06 +0000
commitb65f717688423c3b3f770d38d63ad681a53121c4 (patch)
tree934e7059f070c0195ae91e1175bd11505f047bd5 /tools/libxc/xc_core.c
parentc720eb6ab76d4b6699d022182daf014df3507d97 (diff)
downloadxen-b65f717688423c3b3f770d38d63ad681a53121c4.tar.gz
xen-b65f717688423c3b3f770d38d63ad681a53121c4.tar.bz2
xen-b65f717688423c3b3f770d38d63ad681a53121c4.zip
[LIBXC] Clean up use of sterror(). Define a thread-safe
version which uses strerror_r(), and tries to cope with the POSIX and GNU versions of that function. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools/libxc/xc_core.c')
-rw-r--r--tools/libxc/xc_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/xc_core.c b/tools/libxc/xc_core.c
index 550d5691e1..035bf301e5 100644
--- a/tools/libxc/xc_core.c
+++ b/tools/libxc/xc_core.c
@@ -140,7 +140,7 @@ static int local_file_dump(void *args, char *buffer, unsigned int length)
bytes = write(da->fd, &buffer[offset], length-offset);
if ( bytes <= 0 )
{
- PERROR("Failed to write buffer: %s", strerror(errno));
+ PERROR("Failed to write buffer");
return -errno;
}
}
@@ -158,7 +158,7 @@ xc_domain_dumpcore(int xc_handle,
if ( (da.fd = open(corename, O_CREAT|O_RDWR, S_IWUSR|S_IRUSR)) < 0 )
{
- PERROR("Could not open corefile %s: %s", corename, strerror(errno));
+ PERROR("Could not open corefile %s", corename);
return -errno;
}