On 2021-11-25 4:29 a.m., Mark Kettenis wrote:
And I think it is better to use "device_type" here.

https://github.com/openbios/openboot/blob/master/obp/dev/ide/ide.fth

The obp source list both identifiers, however, the 1275 spec says:

3.2.1.1 Node names

Each node in the device tree is identified by a node *name* using the following notation:

driver-name@unit-address:device-arguments

which led me to thinking that using the name identifier was more appropriate than device_type.

Later the 1275 spec says

“name” - Standard property name to define the name of the package

in contrast to

“device_type” - Standard property name to specify the implemented interface

.... Anyway I think either is appropriate and will work, however I'll follow you're guidance on it, as I'm much less experienced here.

So based on what I see in diskprobe.c, I would probably write this as:

                 parent = OF_parent(handle)
                if (parent && OF_getprop(parent, "device_type", buf,
                    sizeof(buf)) > 0 && strcmp(buf, "ide") == 0)
                        of->f_flags |= F_NOWRITE;
>
Can you test that Ted and mail a new diff?

Yes, it will have to wait until later today when I'm at the machine though. Thanks for taking the time to review in the meantime.

--
Ted Bullock <tbull...@comlore.com>

Reply via email to