|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] don't use PAGE_SIZE in userspace
PAGE_SIZE is not a constant on all architectures, getpagesize()
should be used from userspace. Thanks,
Alex
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
diff -r 381f119b15a0 tools/blktap/drivers/block-qcow.c
--- a/tools/blktap/drivers/block-qcow.c Tue Dec 19 21:33:12 2006 +0000
+++ b/tools/blktap/drivers/block-qcow.c Tue Dec 19 19:41:01 2006 -0700
@@ -1353,7 +1353,8 @@ int qcow_create(const char *filename, ui
free(ptr);
/*adjust file length to 4 KByte boundary*/
- length = ROUNDUP(header_size + (l1_size * sizeof(uint64_t)),PAGE_SIZE);
+ length = ROUNDUP(header_size + (l1_size * sizeof(uint64_t)),
+ getpagesize());
if (qtruncate(fd, length, 0)!=0) {
DPRINTF("ERROR truncating file\n");
return -1;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] don't use PAGE_SIZE in userspace,
Alex Williamson <=
|
|
|
|
|