[Spice-devel] [spice-common][PATCH 1/2] ppc: Deal with lz magic endianess

Denis Kirjanov kda at linux-powerpc.org
Tue May 19 02:34:08 PDT 2015


On 5/18/15, Fabiano FidĂȘncio <fabiano at fidencio.org> wrote:
> On Mon, May 18, 2015 at 6:13 PM, Christophe Fergeau <cfergeau at redhat.com>
> wrote:
>> On Mon, May 18, 2015 at 03:10:57PM +0200, Fabiano FidĂȘncio wrote:
>>> Since commit d39dfbfe lz magic is always treated as LE when encoded.
>>> Treating it as a LE when decoding is now necessary as well.
>>
>> Thanks for the catch. The issue is that given the way LZ_MAGIC is
>> defined in lz_common.h, it will have a different value when running on a
>> big-endian or on a little-endian system. decode_32/encode_32 try to
>> handle endianness on their own, but in the case of LZ_MAGIC, we don't
>> want this special treatment to happen, so we need an extra endian swap.
>> I assume this is what you mean when you say we want to treat it as LE in
>> the log?
>
> Yep, would be better to improve the commit log?

Nice, I'm going to test your changes.
One nit is that isn't ppc specific, rather BE.

Thanks!
>>
>> Christophe
>>
>> _______________________________________________
>> Spice-devel mailing list
>> Spice-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>>
>
>
> Best Regards,
> --
> Fabiano FidĂȘncio
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>


More information about the Spice-devel mailing list