From: "Andreas Färber" <afaerber@suse.de>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: Re: [Qemu-devel] [PATCH 2/3] Allow larger return values from get_image_size()
Date: Fri, 24 Feb 2012 10:15:51 +0100 [thread overview]
Message-ID: <4F475547.1020102@suse.de> (raw)
In-Reply-To: <1330043806-31899-3-git-send-email-david@gibson.dropbear.id.au>
Am 24.02.2012 01:36, schrieb David Gibson:
> Currently get_image_size(), used to find the size of files, returns an int.
> But for modern systems, int may be only 32-bit and we can have files
> larger than that.
>
> This patch, therefore, changes the return type of get_image_size() to off_t
> (the same as the return type from lseek() itself). It also audits all the
> callers of get_image_size() to make sure they process the new unsigned
> return type correctly.
It's a size, so why off_t and not size_t?
Andreas
>
> This leaves load_image_targphys() with a limited return type, but one thing
> at a time (that function has far more callers to be audited, so it will
> take longer to fix).
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-02-24 9:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 0:36 [Qemu-devel] [0/3] Various code cleanups David Gibson
2012-02-24 0:36 ` [Qemu-devel] [PATCH 1/3] pci: Factor out bounds checking on config space accesses David Gibson
2012-02-24 0:36 ` [Qemu-devel] [PATCH 2/3] Allow larger return values from get_image_size() David Gibson
2012-02-24 0:48 ` Michael S. Tsirkin
2012-02-24 9:15 ` Andreas Färber [this message]
2012-02-24 22:08 ` David Gibson
2012-02-27 8:21 ` Markus Armbruster
2012-02-27 8:27 ` David Gibson
2012-02-27 9:31 ` Markus Armbruster
2012-02-24 0:36 ` [Qemu-devel] [PATCH 3/3] .gitignore update David Gibson
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=4F475547.1020102@suse.de \
--to=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
/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.