From: Avi Kivity <avi@qumranet.com>
To: "Tan, Li" <li.tan@intel.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] [RFC][PATCH] kvm: kvmtrace: kvmtrace_format for supporting big_endian
Date: Wed, 28 May 2008 14:17:01 +0300 [thread overview]
Message-ID: <483D3F2D.8070203@qumranet.com> (raw)
In-Reply-To: <08DF4D958216244799FC84F3514D70F001692523@pdsmsx415.ccr.corp.intel.com>
Tan, Li wrote:
> According to http://docs.python.org/lib/module-struct.html
> Character Byte order Size and alignment
> @ native native
> = native standard
> < little-endian standard
>
Oh okay. You are relying on the user to supply the reverse flag.
But you don't need to do that. You can start with the formats as "<I"
and similar. Read the magic word. If it mismatches, switch to ">I" and
start again.
This way you get autodetection of the format, and shorter code as well.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2008-05-28 11:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <08DF4D958216244799FC84F3514D70F0015B1B58@pdsmsx415.ccr.corp.intel.com>
2008-05-14 21:37 ` [kvm-ppc-devel] kvm trace support for ppc Hollis Blanchard
2008-05-14 21:37 ` Hollis Blanchard
2008-05-15 1:20 ` [kvm-ppc-devel] " Tan, Li
2008-05-15 1:20 ` Tan, Li
2008-05-16 6:26 ` [kvm-ppc-devel] " Tan, Li
2008-05-16 6:26 ` Tan, Li
2008-05-20 6:53 ` [PATCH] [RFC][PATCH] kvm: kvmtrace: kvm_trace in kernel for supporting big_endian Tan, Li
2008-05-20 7:03 ` [PATCH] [RFC][PATCH] kvm: kvmtrace: kvmtrace_format " Tan, Li
2008-05-20 16:22 ` Avi Kivity
2008-05-21 7:36 ` Tan, Li
2008-05-21 9:21 ` Avi Kivity
2008-05-22 0:30 ` Tan, Li
2008-05-25 9:34 ` Avi Kivity
2008-05-26 5:38 ` Tan, Li
2008-05-28 11:17 ` Avi Kivity [this message]
2008-06-02 1:25 ` Tan, Li
2008-05-20 16:25 ` [PATCH] [RFC][PATCH] kvm: kvmtrace: kvm_trace in kernel " Avi Kivity
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=483D3F2D.8070203@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=li.tan@intel.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.