[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxc: Use write_exact() in lock_suspend_event().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1237397154 0
# Node ID 6c20b04e5577ddd09387d9edfdb89527ef4cff3b
# Parent  bedd3906979e98e2c84499a8c92a51cebfdae6fd
libxc: Use write_exact() in lock_suspend_event().
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_domain_save.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r bedd3906979e -r 6c20b04e5577 tools/libxc/xc_domain_save.c
--- a/tools/libxc/xc_domain_save.c      Wed Mar 18 15:42:47 2009 +0000
+++ b/tools/libxc/xc_domain_save.c      Wed Mar 18 17:25:54 2009 +0000
@@ -747,7 +747,7 @@ static xen_pfn_t *map_and_save_p2m_table
 #define SUSPEND_LOCK_FILE "/var/lib/xen/suspend_evtchn_lock.d"
 static int lock_suspend_event(void)
 {
-    int fd;
+    int fd, rc;
     mode_t mask;
     char buf[128];
 
@@ -761,10 +761,10 @@ static int lock_suspend_event(void)
     umask(mask);
     snprintf(buf, sizeof(buf), "%10ld", (long)getpid());
 
-    write(fd, buf, strlen(buf));
+    rc = write_exact(fd, buf, strlen(buf));
     close(fd);
 
-    return 0;
+    return rc;
 }
 
 static int unlock_suspend_event(void)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.