All of lore.kernel.org
 help / color / mirror / Atom feed
From: Corey Bryant <coreyb@linux.vnet.ibm.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com,
	stefanha@linux.vnet.ibm.com, libvir-list@redhat.com,
	qemu-devel@nongnu.org, lcapitulino@redhat.com, eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v6 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets
Date: Wed, 08 Aug 2012 09:40:26 -0400	[thread overview]
Message-ID: <50226C4A.6060303@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAJSP0QXw0NJDxHrcNZ+QmJBgWrxiihupXGk0hJbTp29njvOXAA@mail.gmail.com>



On 08/08/2012 04:52 AM, Stefan Hajnoczi wrote:
> On Tue, Aug 7, 2012 at 8:59 PM, Corey Bryant <coreyb@linux.vnet.ibm.com> wrote:
>>
>>
>> On 08/07/2012 02:16 PM, Stefan Hajnoczi wrote:
>>>
>>> On Fri, Aug 3, 2012 at 6:28 PM, Corey Bryant <coreyb@linux.vnet.ibm.com>
>>> wrote:
>>>> +    snprintf(fd_str, sizeof(fd_str), "%ld", fd);
>>>> +    qerror_report(QERR_FD_NOT_FOUND, fd_str);
>>>
>>>
>>> Why use an fd_str instead of passing an int64_t into the error
>>> message?  This also assumed sizeof(long) == 8, which isn't true on
>>> 32-bit hosts, so %ld should be %"PRId64".
>>
>>
>> Can I pass an int64_t into the message if it takes a string?
>>
>> I thought int64_t was a long long in 32-bit mode, but perhaps that's not
>> always the case?
>
> The PRId64 format specifier macro from the C standard hides this so
> you can pass int64_t values to printf()-style functions in a portable
> way.
>
> Stefan
>


Thanks, I'll use PRId64.

-- 
Regards,
Corey

  reply	other threads:[~2012-08-08 13:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-03 17:28 [Qemu-devel] [PATCH v6 0/6] file descriptor passing using fd sets Corey Bryant
2012-08-03 17:28 ` [Qemu-devel] [PATCH v6 1/6] qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg Corey Bryant
2012-08-03 17:33   ` Corey Bryant
2012-08-03 17:28 ` [Qemu-devel] [PATCH v6 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets Corey Bryant
2012-08-07 18:16   ` Stefan Hajnoczi
2012-08-07 19:59     ` Corey Bryant
2012-08-08  8:52       ` Stefan Hajnoczi
2012-08-08 13:40         ` Corey Bryant [this message]
2012-08-03 17:28 ` [Qemu-devel] [PATCH v6 3/6] monitor: Clean up fd sets on monitor disconnect Corey Bryant
2012-08-07 17:32   ` Stefan Hajnoczi
2012-08-07 19:36     ` Corey Bryant
2012-08-03 17:28 ` [Qemu-devel] [PATCH v6 4/6] block: Convert open calls to qemu_open Corey Bryant
2012-08-03 17:28 ` [Qemu-devel] [PATCH v6 5/6] block: Convert close calls to qemu_close Corey Bryant
2012-08-03 17:28 ` [Qemu-devel] [PATCH v6 6/6] block: Enable qemu_open/close to work with fd sets Corey Bryant

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=50226C4A.6060303@linux.vnet.ibm.com \
    --to=coreyb@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.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.