All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v23 05/11] ccid: add passthru card device
Date: Mon, 28 Mar 2011 15:45:12 +0200	[thread overview]
Message-ID: <4D9090E8.1070208@redhat.com> (raw)
In-Reply-To: <20110328121453.GD28224@playa.redhat.com>

On 03/28/11 14:14, Alon Levy wrote:
>>> +static void ccid_card_vscard_send_init(PassthruState *s)
>>> > > +{
>>> > > +    VSCMsgInit msg = {
>>> > > +        .version = htonl(VSCARD_VERSION),
>>> > > +        .magic = VSCARD_MAGIC,
>>> > > +        .capabilities = {0}
>>> > > +    };
>>> > > +
>> > 
>> > If this goes over the wire, don't you need to htonl(VSCARD_MAGIC) here
>> > if someone tries to run passthrough from a big endian system to a little
>> > endian system, or vice versa?
> The VSCARD_MAGIC definition is actually a cast of a string, so it is already
> in the correct byte order:
> 
> libcacard/vscard_common.h:#define VSCARD_MAGIC (*(uint32_t *)"VSCD")
> 

Ah, I was staring at it for a bit and I wasn't quite sure, which is why
I asked the question. Might be worth adding a comment about it.

Otherwise it is good then, so....

Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>

  reply	other threads:[~2011-03-28 13:45 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 13:19 [Qemu-devel] [PATCH v23 00/11] usb-ccid Alon Levy
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 01/11] trace: move trace objects from Makefile to Makefile.objs Alon Levy
2011-03-28 11:59   ` Jes Sorensen
2011-03-28 14:26     ` Alon Levy
2011-03-28 14:30       ` Jes Sorensen
2011-03-28 16:00         ` Alon Levy
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 02/11] qemu-thread.h: include inttypes.h Alon Levy
2011-03-28 11:59   ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 03/11] usb-ccid: add CCID bus Alon Levy
2011-03-28 12:01   ` Jes Sorensen
2011-03-28 12:13     ` Alon Levy
2011-03-28 14:28     ` Alon Levy
2011-03-28 14:31       ` Jes Sorensen
2011-03-28 17:44         ` Blue Swirl
2011-03-28 18:00           ` Alon Levy
2011-03-28 18:08             ` Blue Swirl
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 04/11] introduce libcacard/vscard_common.h Alon Levy
2011-03-28 12:04   ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 05/11] ccid: add passthru card device Alon Levy
2011-03-28 12:08   ` Jes Sorensen
2011-03-28 12:14     ` Alon Levy
2011-03-28 13:45       ` Jes Sorensen [this message]
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 06/11] libcacard: initial commit Alon Levy
2011-03-28 12:35   ` Jes Sorensen
2011-03-28 12:42     ` Alon Levy
2011-03-28 13:52       ` Jes Sorensen
2011-03-28 14:43     ` Alon Levy
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 07/11] libcacard: add vscclient Alon Levy
2011-03-28 12:43   ` Jes Sorensen
2011-03-28 12:51     ` Alon Levy
2011-03-28 13:55       ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 08/11] libcacard: add passthru Alon Levy
2011-03-28 13:27   ` Jes Sorensen
2011-03-28 14:24     ` Alon Levy
2011-03-28 15:21     ` Alon Levy
2011-03-28 15:25       ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 09/11] libcacard: add docs Alon Levy
2011-03-28 13:31   ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 10/11] ccid: add ccid-card-emulated device Alon Levy
2011-03-28 13:39   ` Jes Sorensen
2011-03-23 13:19 ` [Qemu-devel] [PATCH v23 11/11] ccid: add docs Alon Levy
2011-03-28 13:41   ` Jes Sorensen
2011-03-23 15:32 ` [Qemu-devel] [PATCH v23 00/11] usb-ccid Hans de Goede

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=4D9090E8.1070208@redhat.com \
    --to=jes.sorensen@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 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.