From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] [RFC][PATCH] kvm: kvmtrace: kvmtrace_format for supporting big_endian Date: Wed, 28 May 2008 14:17:01 +0300 Message-ID: <483D3F2D.8070203@qumranet.com> References: <08DF4D958216244799FC84F3514D70F0015B1B58@pdsmsx415.ccr.corp.intel.com> <200805141637.03442.hollisb@us.ibm.com> <08DF4D958216244799FC84F3514D70F00164BF05@pdsmsx415.ccr.corp.intel.com> <08DF4D958216244799FC84F3514D70F00164BF20@pdsmsx415.ccr.corp.intel.com> <4832FAD4.2040908@qumranet.com> <08DF4D958216244799FC84F3514D70F00164C4A2@pdsmsx415.ccr.corp.intel.com> <4833E98C.20202@qumranet.com> <08DF4D958216244799FC84F3514D70F00164C67D@pdsmsx415.ccr.corp.intel.com> <4839329D.9080100@qumranet.com> <08DF4D958216244799FC84F3514D70F001692523@pdsmsx415.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Tan, Li" Return-path: Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194]:17768 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752499AbYE1LRF (ORCPT ); Wed, 28 May 2008 07:17:05 -0400 In-Reply-To: <08DF4D958216244799FC84F3514D70F001692523@pdsmsx415.ccr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 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.