All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] fdtput: Make it clearer how to create nodes
@ 2026-10-28  7:34 Simon Glass
  2026-10-28  7:34 ` [PATCH v2 1/4] fdtput: Require a leading '/' with -p Simon Glass
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Simon Glass @ 2026-10-28  7:34 UTC (permalink / raw)
  To: Devicetree Compiler; +Cc: David Gibson, Simon Glass

fdtput can create nodes with -c, and -p creates any missing nodes along
the way, but this is easy to miss. A user has asked for a way to add
nodes, not realising that one exists.

The first patch makes -p reject a path without a leading '/', rather
than creating it from the root, as fdtput already does without -p. The
second allows such a path to start with an alias, creating nodes below
the node which the alias points to. The third suggests -p when a node
is missing, naming the parent which is missing. The fourth names the
property, as well as the node, when it cannot be deleted.

Link: https://github.com/dgibson/dtc/issues/49

Changes in v2:
- Add new patch to reject a path without a leading '/'
- Rework on top of the new patch which requires a leading '/'
- Drop the Fixes tag, since the new patch fixes the bug
- Check that the error suggests -p, using a new helper
- Drop David's Reviewed-by, since the tests have changed
- Report the node as well as the property
- Check the error message in the test
- Drop 2 patches previously applied

Simon Glass (4):
  fdtput: Require a leading '/' with -p
  fdtput: Follow an alias when creating nodes with -p
  fdtput: Suggest -p when a node is missing
  fdtput: Name the property when it cannot be deleted

 fdtput.c           | 41 ++++++++++++++++++++++++++++++-----
 tests/run_tests.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 88 insertions(+), 7 deletions(-)

---
base-commit: 1d50f3f8fa8bf9429eebb0769dafa5df37381ae1
branch: fdtput-nodes2

-- 
2.43.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-29  6:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28  7:34 [PATCH v2 0/4] fdtput: Make it clearer how to create nodes Simon Glass
2026-10-28  7:34 ` [PATCH v2 1/4] fdtput: Require a leading '/' with -p Simon Glass
2026-10-28 20:14   ` Herve Codina
2026-10-29  2:07     ` David Gibson
2026-10-29  6:44       ` Simon Glass
2026-10-28  7:34 ` [PATCH v2 2/4] fdtput: Follow an alias when creating nodes " Simon Glass
2026-10-28 20:34   ` Herve Codina
2026-10-28  7:34 ` [PATCH v2 3/4] fdtput: Suggest -p when a node is missing Simon Glass
2026-10-28 21:08   ` Herve Codina
2026-10-29  2:02     ` David Gibson
2026-10-28  7:34 ` [PATCH v2 4/4] fdtput: Name the property when it cannot be deleted Simon Glass
2026-10-28 21:18   ` Herve Codina
2026-10-29  2:06 ` [PATCH v2 0/4] fdtput: Make it clearer how to create nodes David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.