forked from freedomtan/iOS-device-tree-dump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dt.h
19 lines (15 loc) · 831 Bytes
/
dt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// also from Jonathan Levin's
// but originally from XNU source code I guess
#define kPropNameLength 32
typedef struct DeviceTreeNodeProperty {
char name[kPropNameLength]; // NUL terminated property name
uint32_t length; // Length (bytes) of folloing prop value
// unsigned long value[1]; // Variable length value of property
// Padded to a multiple of a longword?
} DeviceTreeNodeProperty;
typedef struct OpaqueDTEntry {
uint32_t nProperties; // Number of props[] elements (0 => end)
uint32_t nChildren; // Number of children[] elements
// DeviceTreeNodeProperty props[];// array size == nProperties
// DeviceTreeNode children[]; // array size == nChildren
} DeviceTreeNode;