Subject: Re: OpenFirmware, node numbers, handles etc.
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 11/28/2007 09:33:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Nov 28, 2007, at 01:36, der Mouse wrote:

>> is there a good reason why OF handles, node numbers etc. are
>> represented as int in our code?  As far as I can tell using a signed
>> type here only causes trouble since at least node numbers may well
>> have the upper bit set.
>
> Perhaps I'm missing something, but, what difference does it make if
> some of the values happen to be negative?  They're just opaque  
> handles,
> right?

People (including myself at times ) keep running into the trap of  
checking node numbers for >0, which apparently works on some machines  
( not macs though ). Since there is no reason for node numbers and  
handles to be signed as far as I can see I want to make them unsigned.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBR018Q8pnzkX8Yg2nAQI8egf+MYS5vVXGR2lGnoRgKUY2W7JCdfIbDCtp
D6UQ74bF424MtC0+mMdRCmbS3ewR7903btyW+jV8NcxHA8vwcdmHEUS7phHw+XwI
n4lBzlJe8YJsnxUJrkOyt77rvJSv0+AJNc5OpsoVaN0B1dP9aVyN+yFPNEMyYxBm
wQlwXSqsgYVhYzxrXsgLZodlgO75WRm0lfF8MNTQ4d6zGgU0JmvYpMUJwfeXKXHk
QPxoyECXZ+nVCesfdn2h3Td85d7G1uGdj3kjTitbrEzLRbyWjoEbEV1fxGh9vOWe
NOiEldtvQCO67QSS1t3t1drv/92yoFFvgTYaNpW2AcQAz6s+kp2q4w==
=JaJA
-----END PGP SIGNATURE-----