Re: [PATCH] libfdt: fdt_path_offset_namelen: Reject empty path

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



Hi Rob,

On Fri, 6 Oct 2023 at 08:06, Rob Herring <robh@xxxxxxxxxx> wrote:
>
> On Fri, Oct 6, 2023 at 7:48 AM Pierre-Clément Tosi <ptosi@xxxxxxxxxx> wrote:
> >
> > Make empty paths result in FDT_ERR_BADPATH.
> >
> > Per the specification (v0.4-rc4):
> >
> > > The convention for specifying a device path is:
> > >     /node-name-1/node-name-2/node-name-N
> > >
> > > The path to the root node is /.
> > >
> > > A unit address may be omitted if the full path to the
> > > node is unambiguous.
>
> How is this part relevant to this patch? In any case, I don't think we
> actually allow that. Maybe libfdt does, but at least it's a dtc
> warning.

I agree it isn't relevant...re your point, see fdt_nodename_eq_()
which matches without the '@' so long as the length provided is the
length of the node name without the '@'. It doesn't check for
ambiguous nodes.

Regards,
Simon





[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux