Rev 2927 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2927 | Rev 3107 | ||
---|---|---|---|
Line 64... | Line 64... | ||
64 | #define RE_OK 0 /* No error */ |
64 | #define RE_OK 0 /* No error */ |
65 | #define RE_INVALID 1 /* Invalid RAM disk image */ |
65 | #define RE_INVALID 1 /* Invalid RAM disk image */ |
66 | #define RE_UNSUPPORTED 2 /* Non-supported image (e.g. wrong version) */ |
66 | #define RE_UNSUPPORTED 2 /* Non-supported image (e.g. wrong version) */ |
67 | 67 | ||
68 | /** RAM disk header */ |
68 | /** RAM disk header */ |
69 | typedef struct { |
69 | struct rd_header { |
70 | uint8_t magic[RD_MAGIC_SIZE]; |
70 | uint8_t magic[RD_MAGIC_SIZE]; |
71 | uint8_t version; |
71 | uint8_t version; |
72 | uint8_t data_type; |
72 | uint8_t data_type; |
73 | uint32_t header_size; |
73 | uint32_t header_size; |
74 | uint64_t data_size; |
74 | uint64_t data_size; |
75 | } rd_header; |
75 | } __attribute__ ((packed)); |
76 | 76 | ||
- | 77 | typedef struct rd_header rd_header_t; |
|
- | 78 | ||
77 | extern int init_rd(rd_header * addr, size_t size); |
79 | extern int init_rd(rd_header_t *addr, size_t size); |
78 | 80 | ||
79 | #endif |
81 | #endif |
80 | 82 | ||
81 | /** @} |
83 | /** @} |
82 | */ |
84 | */ |