WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: Use write_exact() in lock_suspend_event().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Mar 2009 10:35:10 -0700
Delivery-date: Wed, 18 Mar 2009 10:35:43 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: Use write_exact() in lock_suspend_event()., Xen patchbot-unstable <=