ia64/xen-unstable

changeset 19393:6c20b04e5577

libxc: Use write_exact() in lock_suspend_event().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Mar 18 17:25:54 2009 +0000 (2009-03-18)
parents bedd3906979e
children 2039e8271051
files tools/libxc/xc_domain_save.c
line diff
     1.1 --- a/tools/libxc/xc_domain_save.c	Wed Mar 18 15:42:47 2009 +0000
     1.2 +++ b/tools/libxc/xc_domain_save.c	Wed Mar 18 17:25:54 2009 +0000
     1.3 @@ -747,7 +747,7 @@ static xen_pfn_t *map_and_save_p2m_table
     1.4  #define SUSPEND_LOCK_FILE "/var/lib/xen/suspend_evtchn_lock.d"
     1.5  static int lock_suspend_event(void)
     1.6  {
     1.7 -    int fd;
     1.8 +    int fd, rc;
     1.9      mode_t mask;
    1.10      char buf[128];
    1.11  
    1.12 @@ -761,10 +761,10 @@ static int lock_suspend_event(void)
    1.13      umask(mask);
    1.14      snprintf(buf, sizeof(buf), "%10ld", (long)getpid());
    1.15  
    1.16 -    write(fd, buf, strlen(buf));
    1.17 +    rc = write_exact(fd, buf, strlen(buf));
    1.18      close(fd);
    1.19  
    1.20 -    return 0;
    1.21 +    return rc;
    1.22  }
    1.23  
    1.24  static int unlock_suspend_event(void)