On Sun, 9 Oct 2005, [EMAIL PROTECTED] yowled:
> On Monday 03 October 2005 21:50, Nix wrote:
>> Well, 140789027962880 divides evenly into 2^32. Byte-ordering or a
>> one-long misalignment of some kind or I'll eat my hat. (I haven't got a
>> hat so I'll have to get one first and then eat it.)
> 
> Ok, no need to buy any hat. I would have liked very much to see you doing 
> that, but it will be for next time ;-).

Oh, good, I was wondering if I'd have to find somewhere that sold
shortbread headgear. :)

> Compliments.

Hey, you're the one who deserves the complients. You fixed the bug. I just
pontificated. I could at least have bisected for it...

> In fact, between 2.6.13-rc3 and -rc4, a "global style fixup" (which was 
> deemed 
> trivial, and which didn't even reach neither me nor Jeff) affected 

Ah, isn't it wonderful when people break your code without telling you?

> diff --git a/arch/um/drivers/cow.h b/arch/um/drivers/cow.h
> --- a/arch/um/drivers/cow.h
> +++ b/arch/um/drivers/cow.h
> @@ -3,10 +3,10 @@
> 
>  #include <asm/types.h>
> 
> -#if __BYTE_ORDER == __BIG_ENDIAN
> +#if defined(__BIG_ENDIAN)
>  # define ntohll(x) (x)
>  # define htonll(x) (x)
> -#elif __BYTE_ORDER == __LITTLE_ENDIAN
> +#elif defined(__LITTLE_ENDIAN)
>  # define ntohll(x)  bswap_64(x)
>  # define htonll(x)  bswap_64(x)
>  #else

Someone didn't notice the significance of that UML-and-userspace-
specific __BYTE_ORDER, I fear.

> grep [nh]to[hn]ll arch/um/drivers/{cow*,ubd*}
> 
> shows all the culprit calls.

(well, with quoting to stop the shell interpreting that regexp :) )

> And they affect exactly size.

You've got it, I'd say.

> Patches are attached - to apply in this order. Actually the first should fix 
> everything, but I'm gonna merge all three ones in -bs4, so you can test all 
> them together (I actually compared the preprocessed source).

... yep, confirmed; with those patches, it works.


Thank you!

-- 
`Next: FEMA neglects to take into account the possibility of
fire in Old Balsawood Town (currently in its fifth year of drought
and home of the General Grant Home for Compulsive Arsonists).'
            --- James Nicoll


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to