Supporting aliases in PATHREFs

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



We currently have support for referring to a path via:

&{/foo/bar}
{
  …
};


Was looking at supporting aliases in that as well, so you could have:

aliases {
   aname = &{/foo/bar};
};

&{aname}
{
…
};

As I look at making the changes to support this, had a few questions:
1. So we use DT_PATH_REF in the lexer for this, or introduce something like DT_ALIAS_REF?
2. On the yacc side, looks like there is get_node_by_ref() and add_orphan_node() would need changing to distinguish a PATH, ALIAS, and LABEL reference as right now they utilize the ref starting with “/“ to distinguish between PATH & LABEL references.  Would passing a 3rd parameter that is some ENUM type be the way to go here?
3. Are there any other places I should look to fix things so aliases can be used similar to a path?

I’m not super familiar with lex/yacc so looking for guidance.

thanks

- k



[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