ia64/xen-unstable

changeset 13130:87dceaa715af

[BLTAP] Use getpagesize() for portability.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author kfraser@localhost.localdomain
date Wed Dec 20 10:11:45 2006 +0000 (2006-12-20)
parents f99dd72ae205
children b17d1bc1febf
files tools/blktap/drivers/block-qcow.c
line diff
     1.1 --- a/tools/blktap/drivers/block-qcow.c	Wed Dec 20 10:09:42 2006 +0000
     1.2 +++ b/tools/blktap/drivers/block-qcow.c	Wed Dec 20 10:11:45 2006 +0000
     1.3 @@ -1352,8 +1352,9 @@ int qcow_create(const char *filename, ui
     1.4  	printf("Created cksum: %d\n",exthdr.cksum);
     1.5  	free(ptr);
     1.6  
     1.7 -	/*adjust file length to 4 KByte boundary*/
     1.8 -	length = ROUNDUP(header_size + (l1_size * sizeof(uint64_t)),PAGE_SIZE);
     1.9 +	/*adjust file length to system page size boundary*/
    1.10 +	length = ROUNDUP(header_size + (l1_size * sizeof(uint64_t)),
    1.11 +		getpagesize());
    1.12  	if (qtruncate(fd, length, 0)!=0) {
    1.13  		DPRINTF("ERROR truncating file\n");
    1.14  		return -1;