libfdt: Introduce flat tree format v17
v17 of the blob format adds a field for the size of the structure block, but is backwards compatible with v16. This patch introduces definitions for the new field, and uses it to improve the bounds checking in the read-only code. It also cleans up the sequential write code using it: we no longer need to borrow the version field as a write pointer.
This commit is contained in:
@@ -36,6 +36,5 @@ const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
|
||||
#define PTR_ERROR(code) (void *)(-(code))
|
||||
|
||||
#define SW_MAGIC (~FDT_MAGIC)
|
||||
#define sw_size_dt_struct(fdt) (fdt32_to_cpu(((fdt)->version)))
|
||||
|
||||
#endif /* _LIBFDT_INTERNAL_H */
|
||||
|
||||
Reference in New Issue
Block a user