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] [BLTAP] Use getpagesize() for portability

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [BLTAP] Use getpagesize() for portability.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 20 Dec 2006 17:15:09 -0800
Delivery-date: Wed, 20 Dec 2006 17:16:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [BLTAP] Use getpagesize() for portability., Xen patchbot-unstable <=