* adfWriteFileExtBlock * */
| 756 | * |
| 757 | */ |
| 758 | RETCODE adfWriteFileExtBlock(struct Volume *vol, SECTNUM nSect, struct bFileExtBlock* fext) |
| 759 | { |
| 760 | uint8_t buf[512]; |
| 761 | uint32_t newSum; |
| 762 | RETCODE rc = RC_OK; |
| 763 | |
| 764 | fext->type = T_LIST; |
| 765 | fext->secType = ST_FILE; |
| 766 | fext->dataSize = 0L; |
| 767 | fext->firstData = 0L; |
| 768 | |
| 769 | memcpy(buf,fext,512); |
| 770 | #ifdef LITT_ENDIAN |
| 771 | swapEndian(buf, SWBL_FEXT); |
| 772 | #endif |
| 773 | newSum = adfNormalSum(buf,20,512); |
| 774 | swLong(buf+20,newSum); |
| 775 | /* *(int32_t*)(buf+20) = swapLong((uint8_t*)&newSum);*/ |
| 776 | |
| 777 | adfWriteBlock(vol,nSect,buf); |
| 778 | |
| 779 | return rc; |
| 780 | } |
| 781 | /*###########################################################################*/ |
no test coverage detected