* adfWriteEntryBlock * */
| 1012 | * |
| 1013 | */ |
| 1014 | RETCODE adfWriteEntryBlock(struct Volume* vol, SECTNUM nSect, struct bEntryBlock *ent) |
| 1015 | { |
| 1016 | uint8_t buf[512]; |
| 1017 | uint32_t newSum; |
| 1018 | |
| 1019 | |
| 1020 | memcpy(buf, ent, sizeof(struct bEntryBlock)); |
| 1021 | |
| 1022 | #ifdef LITT_ENDIAN |
| 1023 | swapEndian(buf, SWBL_ENTRY); |
| 1024 | #endif |
| 1025 | newSum = adfNormalSum(buf,20,sizeof(struct bEntryBlock)); |
| 1026 | swLong(buf+20, newSum); |
| 1027 | |
| 1028 | if (adfWriteBlock(vol, nSect, buf)!=RC_OK) |
| 1029 | return RC_ERROR; |
| 1030 | |
| 1031 | return RC_OK; |
| 1032 | } |
| 1033 | |
| 1034 | |
| 1035 | /* |
no test coverage detected