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

[Xen-changelog] [xen-unstable] [BLTAP] Use getpagesize() for portability.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1166609505 0
# Node ID 87dceaa715af9a71512386779a8b08f157326676
# Parent  f99dd72ae205556994f3ea5ff065c6cfb02c42d0
[BLTAP] Use getpagesize() for portability.
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 tools/blktap/drivers/block-qcow.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r f99dd72ae205 -r 87dceaa715af tools/blktap/drivers/block-qcow.c
--- a/tools/blktap/drivers/block-qcow.c Wed Dec 20 10:09:42 2006 +0000
+++ b/tools/blktap/drivers/block-qcow.c Wed Dec 20 10:11:45 2006 +0000
@@ -1352,8 +1352,9 @@ int qcow_create(const char *filename, ui
        printf("Created cksum: %d\n",exthdr.cksum);
        free(ptr);
 
-       /*adjust file length to 4 KByte boundary*/
-       length = ROUNDUP(header_size + (l1_size * sizeof(uint64_t)),PAGE_SIZE);
+       /*adjust file length to system page size boundary*/
+       length = ROUNDUP(header_size + (l1_size * sizeof(uint64_t)),
+               getpagesize());
        if (qtruncate(fd, length, 0)!=0) {
                DPRINTF("ERROR truncating file\n");
                return -1;

_______________________________________________
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®.