libfdt: Enhanced and published fdt_next_tag()
Enhanced the formerly private function _fdt_next_tag() to allow stepping
through the tree, used to produce a human-readable dump, and made
it part of the published interface.
Also added some comments.
diff --git a/libfdt/fdt_wip.c b/libfdt/fdt_wip.c
index 0db7d25..261b9b0 100644
--- a/libfdt/fdt_wip.c
+++ b/libfdt/fdt_wip.c
@@ -68,12 +68,12 @@
uint32_t tag;
int offset, nextoffset;
- tag = _fdt_next_tag(fdt, nodeoffset, &nextoffset);
+ tag = fdt_next_tag(fdt, nodeoffset, &nextoffset, NULL);
if (tag != FDT_BEGIN_NODE)
return -FDT_ERR_BADOFFSET;
do {
offset = nextoffset;
- tag = _fdt_next_tag(fdt, offset, &nextoffset);
+ tag = fdt_next_tag(fdt, offset, &nextoffset, NULL);
switch (tag) {
case FDT_END: