MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / adfWriteFileExtBlock

Function adfWriteFileExtBlock

dep/adflib/src/adf_file.c:758–780  ·  view source on GitHub ↗

* adfWriteFileExtBlock * */

Source from the content-addressed store, hash-verified

756 *
757 */
758RETCODE 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/*###########################################################################*/

Callers 2

adfFlushFileFunction · 0.85
adfCreateNextFileBlockFunction · 0.85

Calls 4

swapEndianFunction · 0.85
adfNormalSumFunction · 0.85
swLongFunction · 0.85
adfWriteBlockFunction · 0.85

Tested by

no test coverage detected