Changeset 058b021 in mainline for kernel/generic/src/lib/rd.c
- Timestamp:
- 2006-11-30T13:43:00Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c55dd58
- Parents:
- 0cf1dcf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/lib/rd.c
r0cf1dcf r058b021 39 39 40 40 #include <lib/rd.h> 41 #include <arch/byteorder.h> 41 42 42 bool init_rd(void * addr)43 int init_rd(rd_header * header) 43 44 { 44 return false; 45 /* Identify RAM disk */ 46 if ((header->magic[0] != RD_MAG0) || (header->magic[1] != RD_MAG1) || (header->magic[2] != RD_MAG2) || (header->magic[3] != RD_MAG3)) 47 return RE_INVALID; 48 49 /* Identify version */ 50 if (header->version != RD_VERSION) 51 return RE_UNSUPPORTED; 52 53 uint64_t hsize; 54 switch (header->data_type) { 55 case RD_DATA_LSB: 56 hsize = uint64_t_le2host(header->header_size); 57 break; 58 // case RD_DATA_MSB: 59 // hsize = uint64_t_be2host(header->header_size); 60 // break; 61 default: 62 return RE_UNSUPPORTED; 63 } 64 65 66 return RE_OK; 45 67 } 46 68
Note:
See TracChangeset
for help on using the changeset viewer.