qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: agraf@suse.de, qemu-devel@nongnu.org, armbru@redhat.com
Subject: [Qemu-devel] Re: [PATCH] Make strtosz() return int64_t instead of ssize_t
Date: Wed, 05 Jan 2011 15:40:22 +0100	[thread overview]
Message-ID: <4D2482D6.2030401@redhat.com> (raw)
In-Reply-To: <4D247633.80304@codemonkey.ws>

On 01/05/11 14:46, Anthony Liguori wrote:
> On 01/05/2011 04:41 AM, Jes.Sorensen@redhat.com wrote:
>> From: Jes Sorensen<Jes.Sorensen@redhat.com>
>>
>> strtosz() needs to return a 64 bit type even on 32 bit
>> architectures. Otherwise qemu-img will fail to create disk
>> images>= 2GB
>>
>> Signed-off-by: Jes Sorensen<Jes.Sorensen@redhat.com>
>>    
> 
> off_t would be the proper type to use.

I discussed this with Markus, and we both agree that it isn't.

Two reasons, off_t is for filesystem offsets, not random sizes. Second,
off_t doesn't have an unsigned type or a max to compare against.

Using int64_t is cleaner and safer.

Cheers,
Jes

  reply	other threads:[~2011-01-05 14:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-05 10:41 [Qemu-devel] [PATCH] Make strtosz() return int64_t instead of ssize_t Jes.Sorensen
2011-01-05 12:34 ` [Qemu-devel] " Michael S. Tsirkin
2011-01-05 12:36   ` Jes Sorensen
2011-01-05 12:49     ` Michael S. Tsirkin
2011-01-05 13:46 ` Anthony Liguori
2011-01-05 14:40   ` Jes Sorensen [this message]
2011-01-05 18:29     ` Anthony Liguori
2011-01-05 19:30       ` Jes Sorensen
2011-01-11 13:36 ` [Qemu-devel] " Kevin Wolf

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=4D2482D6.2030401@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=armbru@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).