Re: seperator error in __mask_snprintf_len

From: Paul Jackson
Date: Wed Jan 14 2004 - 19:40:06 EST


> I've been working on-and-off on fixing the equivalent endian problem
> in __mask_parse_len. How is that part going for you? I haven't yet
> decided if I want to post it.

I have coded both - it was a simple matter of replacing each:

wordp[i]

with:

wordp[M32X(i)]

where M32X (for "Mask 32-bit indeX") is defined:

#include <asm/byteorder.h>
#if BITS_PER_LONG == 64 && defined(__BIG_ENDIAN)
#define M32X(i) ((i)^1)
#elif BITS_PER_LONG == 32 || defined(__LITTLE_ENDIAN)
#define M32X(i) (i)
#endif

I spent more time writing the comments explaining it than I did writing
the code.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/