tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: General device properties API



> On Aug 15, 2021, at 9:30 AM, Michael <macallan%netbsd.org@localhost> wrote:
> 
> Does this append a NUL if the property doesn't have one?
> IIRC OpenFirmware can be a bit inconsistent with that, I remember doing
> things like zeroing the buffer, then requesting buffer_size - 1 from
> OF_getprop() to make sure the result is NUL terminated.
> Looking at you, Apple...

Got an example of where you’ve done this?  Anyway, I can certainly put some belt-and-suspenders around this in the OpenFirmware back-end.  I have defined the interface to always NUL-terminate.

-- thorpej



Home | Main Index | Thread Index | Old Index