Changes in kernel/generic/include/lib/rd.h [fb48a0e:d99c1d2] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/lib/rd.h
rfb48a0e rd99c1d2 38 38 #include <typedefs.h> 39 39 40 extern void init_rd(void *, size_t); 40 /** 41 * RAM disk version 42 */ 43 #define RD_VERSION 1 44 45 /** 46 * RAM disk magic number 47 */ 48 #define RD_MAGIC_SIZE 4 49 #define RD_MAG0 'H' 50 #define RD_MAG1 'O' 51 #define RD_MAG2 'R' 52 #define RD_MAG3 'D' 53 54 /** 55 * RAM disk data encoding types 56 */ 57 #define RD_DATA_NONE 0 58 #define RD_DATA_LSB 1 /* Least significant byte first (little endian) */ 59 #define RD_DATA_MSB 2 /* Most signigicant byte first (big endian) */ 60 61 /** 62 * RAM disk error return codes 63 */ 64 #define RE_OK 0 /* No error */ 65 #define RE_INVALID 1 /* Invalid RAM disk image */ 66 #define RE_UNSUPPORTED 2 /* Non-supported image (e.g. wrong version) */ 67 68 /** RAM disk header */ 69 struct rd_header { 70 uint8_t magic[RD_MAGIC_SIZE]; 71 uint8_t version; 72 uint8_t data_type; 73 uint32_t header_size; 74 uint64_t data_size; 75 } __attribute__ ((packed)); 76 77 typedef struct rd_header rd_header_t; 78 79 extern int init_rd(rd_header_t *addr, size_t size); 41 80 42 81 #endif
Note:
See TracChangeset
for help on using the changeset viewer.