All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Breeds <tony@bakeyournoodle.com>
To: Alex Williamson <alex.williamson@hp.com>
Cc: xen-devel <xen-devel@lists.xensource.com>, julian@xensource.com
Subject: Re: [PATCH] don't use PAGE_SIZE in userspace
Date: Wed, 20 Dec 2006 14:26:45 +1100	[thread overview]
Message-ID: <20061220032645.GB27551@bakeyournoodle.com> (raw)
In-Reply-To: <1166582883.5054.6.camel@bling>

On Tue, Dec 19, 2006 at 07:48:03PM -0700, Alex Williamson wrote:
> 
>    PAGE_SIZE is not a constant on all architectures, getpagesize()
> should be used from userspace.  Thanks,
> 
> 	Alex
> 
> Signed-off-by: Alex Williamson <alex.williamson@hp.com>
> ---
> 
> 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());

How about updateing the comment above, aswell?

Yours Tony

   linux.conf.au       http://linux.conf.au/ || http://lca2007.linux.org.au/
   Jan 15-20 2007      The Australian Linux Technical Conference!

  reply	other threads:[~2006-12-20  3:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20  2:48 [PATCH] don't use PAGE_SIZE in userspace Alex Williamson
2006-12-20  3:26 ` Tony Breeds [this message]
2006-12-20  3:36   ` Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061220032645.GB27551@bakeyournoodle.com \
    --to=tony@bakeyournoodle.com \
    --cc=alex.williamson@hp.com \
    --cc=julian@xensource.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.