make fdt_node_get_prop fail by end of node
This commit is contained in:
@@ -187,7 +187,10 @@ static int fdt_node_get_prop(char * filename, char * fdt, char * strings, int of
|
||||
buf_offset = 0;
|
||||
}
|
||||
|
||||
if (FDT_PROP == fdt32_to_cpu(*(int *)(fdt_offset_ptr_(fdt, buf, buf_offset))))
|
||||
int tag = fdt32_to_cpu(*(int *)(fdt_offset_ptr_(fdt, buf, buf_offset)));
|
||||
if (FDT_END_NODE == tag)
|
||||
break;
|
||||
else if (FDT_PROP == tag)
|
||||
{
|
||||
const struct fdt_property *prop = fdt_offset_ptr_(fdt, buf, buf_offset);
|
||||
debug("prop->nameoff: %x (%x)\n", fdt32_to_cpu(prop->nameoff), fdt_off_dt_strings(fdt));
|
||||
|
||||
Reference in New Issue
Block a user