generated from rust-vmm/crate-template
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
begin_node does not enforce limits defined in the specification #32
Comments
I think we can check the valid chars without adding a regex dependency - it's a little verbose, but something like this should work:
I can put together a PR if you think this approach looks OK. |
danielverkamp
added a commit
to danielverkamp/vm-fdt
that referenced
this issue
Aug 23, 2021
Add checks for the requirements in the devicetree specifications. This does not check for any specific bus binding requirements for unit addresses (as in "node-name@unit-address"); only the generic requirements for all node names are enforced. Fixes rust-vmm#32. Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
I tweaked the checks some more using matches and added some checks for the |
danielverkamp
added a commit
to danielverkamp/vm-fdt
that referenced
this issue
Aug 23, 2021
Add checks for the requirements in the devicetree specifications. This does not check for any specific bus binding requirements for unit addresses (as in "node-name@unit-address"); only the generic requirements for all node names are enforced. Fixes rust-vmm#32. Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
danielverkamp
added a commit
to danielverkamp/vm-fdt
that referenced
this issue
Aug 24, 2021
Add checks for the requirements in the devicetree specifications. This does not check for any specific bus binding requirements for unit addresses (as in "node-name@unit-address"); only the generic requirements for all node names are enforced. Fixes rust-vmm#32. Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
lauralt
pushed a commit
that referenced
this issue
Aug 25, 2021
Add checks for the requirements in the devicetree specifications. This does not check for any specific bus binding requirements for unit addresses (as in "node-name@unit-address"); only the generic requirements for all node names are enforced. Fixes #32. Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The FDT specification describes a string length of e.g. the begin_node of 1 to 31 chars and enforces a strict character limitation described in https://devicetree-specification.readthedocs.io/en/stable/devicetree-basics.html#node-name-requirements.
Enforcing the character limitation would mean adding a dependency on regex, which is undesirable. We could instead enforce the size limitation, and document the character limitation as something that is not currently validated.
@danielverkamp what do you think?
The text was updated successfully, but these errors were encountered: