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:
David Gibson
2006-12-01 16:25:39 +11:00
parent aeddfe2c34
commit fe92f6bb75
6 changed files with 23 additions and 13 deletions

View File

@@ -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 */