Re: format_cpumask()

William Lee Irwin III
2003-11-17T23:35:50Z

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