[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: xc_domain_save.c: rename "write_exact" macro
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1275035211 -3600 # Node ID ff10a1fdc83e1361563df2dd9c7679cc0f6cb912 # Parent 0e0fa50e663b0561e439717af265ea2c6224d02b libxc: xc_domain_save.c: rename "write_exact" macro There is already a "write_exact" function declared in xc_private.h. So rename this macro to to wrexact. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tools/libxc/xc_domain_save.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) diff -r 0e0fa50e663b -r ff10a1fdc83e tools/libxc/xc_domain_save.c --- a/tools/libxc/xc_domain_save.c Fri May 28 09:26:25 2010 +0100 +++ b/tools/libxc/xc_domain_save.c Fri May 28 09:26:51 2010 +0100 @@ -1134,7 +1134,7 @@ int xc_domain_save(int xc_handle, int io } copypages: -#define write_exact(fd, buf, len) write_buffer(last_iter, &ob, (fd), (buf), (len)) +#define wrexact(fd, buf, len) write_buffer(last_iter, &ob, (fd), (buf), (len)) #ifdef ratewrite #undef ratewrite #endif @@ -1334,7 +1334,7 @@ int xc_domain_save(int xc_handle, int io } } - if ( write_exact(io_fd, &batch, sizeof(unsigned int)) ) + if ( wrexact(io_fd, &batch, sizeof(unsigned int)) ) { PERROR("Error when writing to state file (2)"); goto out; @@ -1343,7 +1343,7 @@ int xc_domain_save(int xc_handle, int io if ( sizeof(unsigned long) < sizeof(*pfn_type) ) for ( j = 0; j < batch; j++ ) ((unsigned long *)pfn_type)[j] = pfn_type[j]; - if ( write_exact(io_fd, pfn_type, sizeof(unsigned long)*batch) ) + if ( wrexact(io_fd, pfn_type, sizeof(unsigned long)*batch) ) { PERROR("Error when writing to state file (3)"); goto out; @@ -1457,7 +1457,7 @@ int xc_domain_save(int xc_handle, int io DPRINTF("Entering debug resend-all mode\n"); /* send "-1" to put receiver into debug mode */ - if ( write_exact(io_fd, &minusone, sizeof(int)) ) + if ( wrexact(io_fd, &minusone, sizeof(int)) ) { PERROR("Error when writing to state file (6)"); goto out; @@ -1542,7 +1542,7 @@ int xc_domain_save(int xc_handle, int io } chunk.vcpumap = vcpumap; - if ( write_exact(io_fd, &chunk, sizeof(chunk)) ) + if ( wrexact(io_fd, &chunk, sizeof(chunk)) ) { PERROR("Error when writing to state file"); goto out; @@ -1562,7 +1562,7 @@ int xc_domain_save(int xc_handle, int io (unsigned long *)&chunk.data); if ( (chunk.data != 0) && - write_exact(io_fd, &chunk, sizeof(chunk)) ) + wrexact(io_fd, &chunk, sizeof(chunk)) ) { PERROR("Error when writing the ident_pt for EPT guest"); goto out; @@ -1573,7 +1573,7 @@ int xc_domain_save(int xc_handle, int io (unsigned long *)&chunk.data); if ( (chunk.data != 0) && - write_exact(io_fd, &chunk, sizeof(chunk)) ) + wrexact(io_fd, &chunk, sizeof(chunk)) ) { PERROR("Error when writing the vm86 TSS for guest"); goto out; @@ -1582,7 +1582,7 @@ int xc_domain_save(int xc_handle, int io /* Zero terminate */ i = 0; - if ( write_exact(io_fd, &i, sizeof(int)) ) + if ( wrexact(io_fd, &i, sizeof(int)) ) { PERROR("Error when writing to state file (6')"); goto out; @@ -1600,7 +1600,7 @@ int xc_domain_save(int xc_handle, int io (unsigned long *)&magic_pfns[1]); xc_get_hvm_param(xc_handle, dom, HVM_PARAM_STORE_PFN, (unsigned long *)&magic_pfns[2]); - if ( write_exact(io_fd, magic_pfns, sizeof(magic_pfns)) ) + if ( wrexact(io_fd, magic_pfns, sizeof(magic_pfns)) ) { PERROR("Error when writing to state file (7)"); goto out; @@ -1614,13 +1614,13 @@ int xc_domain_save(int xc_handle, int io goto out; } - if ( write_exact(io_fd, &rec_size, sizeof(uint32_t)) ) + if ( wrexact(io_fd, &rec_size, sizeof(uint32_t)) ) { PERROR("error write hvm buffer size"); goto out; } - if ( write_exact(io_fd, hvm_buf, rec_size) ) + if ( wrexact(io_fd, hvm_buf, rec_size) ) { PERROR("write HVM info failed!\n"); goto out; @@ -1644,7 +1644,7 @@ int xc_domain_save(int xc_handle, int io j++; } - if ( write_exact(io_fd, &j, sizeof(unsigned int)) ) + if ( wrexact(io_fd, &j, sizeof(unsigned int)) ) { PERROR("Error when writing to state file (6a)"); goto out; @@ -1658,7 +1658,7 @@ int xc_domain_save(int xc_handle, int io i++; if ( (j == 1024) || (i == dinfo->p2m_size) ) { - if ( write_exact(io_fd, &pfntab, sizeof(unsigned long)*j) ) + if ( wrexact(io_fd, &pfntab, sizeof(unsigned long)*j) ) { PERROR("Error when writing to state file (6b)"); goto out; @@ -1729,7 +1729,7 @@ int xc_domain_save(int xc_handle, int io FOLD_CR3(mfn_to_pfn(UNFOLD_CR3(ctxt.x64.ctrlreg[1]))); } - if ( write_exact(io_fd, &ctxt, ((dinfo->guest_width==8) + if ( wrexact(io_fd, &ctxt, ((dinfo->guest_width==8) ? sizeof(ctxt.x64) : sizeof(ctxt.x32))) ) { @@ -1745,7 +1745,7 @@ int xc_domain_save(int xc_handle, int io ERROR("No extended context for VCPU%d", i); goto out; } - if ( write_exact(io_fd, &domctl.u.ext_vcpucontext, 128) ) + if ( wrexact(io_fd, &domctl.u.ext_vcpucontext, 128) ) { PERROR("Error when writing to state file (2)"); goto out; @@ -1758,7 +1758,7 @@ int xc_domain_save(int xc_handle, int io memcpy(page, live_shinfo, PAGE_SIZE); SET_FIELD(((shared_info_any_t *)page), arch.pfn_to_mfn_frame_list_list, 0); - if ( write_exact(io_fd, page, PAGE_SIZE) ) + if ( wrexact(io_fd, page, PAGE_SIZE) ) { PERROR("Error when writing to state file (1)"); goto out; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |