Re: aliases node - valid char set?

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



On Thu, Apr 12, 2018 at 02:44:20PM +1000, David Gibson wrote:

Back in the OF days there might have been more restrictions based on
special characters in the Forth environment, to prevent paths with
aliases being confused for something else.  Not sure.

Not sure how much IEE 1275 really matters these days, but it specifies
node names as:

   driver-name@unit-address:device-arguments

with the driver name [a-zA-Z0-9,._+-]+ (the comma being a convention),
the address is "bus dependent", and the device arguments being all
printable characters other than "/", ":", and "@".

The "/" obviously being because it is the path separator.

Alias name is any sequence of printable characters, other than "/",
"\", ":", "[", "]", and "@".

Property names do not allow upper-case characters, or "/", "\", ":",
"[", "]", and "@".

It does specify a specific encoding of 8859-1, which is a bit annoying
in this Unicode world.  Many bytes of UTF-8 would be considered
"non-printable" in 8859-1.

I think mainly the restricted characters would matter, for parsing
reasons (although the above suggests that "{" and "}" would be allowed
in an identifier, which, although allowed by FORTH, is not going to be
parsed that way by DTC).

FORTH's rules were pretty simple, a word was a string of characters
separated by a space.  There aren't really any restrictions on the
names, although names that look like numbers supersede that number, so
aren't really a good idea.

The DTC lexer being quite different.

David
--
To unsubscribe from this list: send the line "unsubscribe devicetree-spec" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux