Re: format_cpumask()

From: William Lee Irwin III
Date: Mon Nov 17 2003 - 18:37:12 EST


On Mon, Nov 17, 2003 at 10:49:31AM -0800, Luck, Tony wrote:
> That makes it had to write portable shell scripts (etc.) that can
> parse these values on both 32-bit and 64-bit systems? A bitmask with
> just cpu0 set looks like:
> 0000000100000000
> on a 32-bit machine. And like:
> 0000000000000001
> on a 64-bit machine. Heaven help the architectures (ia64, sparc, ppc)
> that support both 32-bit and 64-bit applications!

Okay, so we need to:

(a) zero-pad the 64-bit case
(b) pick a format the users actually like

I was trying to make it a NR_CPUS -bit integer with the highest nybbles
printed first. What's your favorite alternative?


-- wli
-
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/