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

Function adfWriteEntryBlock

dep/adflib/src/adf_dir.c:1014–1032  ·  view source on GitHub ↗

* adfWriteEntryBlock * */

Source from the content-addressed store, hash-verified

1012 *
1013 */
1014RETCODE 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/*

Callers 2

adfRenameEntryFunction · 0.85
adfRemoveEntryFunction · 0.85

Calls 4

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

Tested by

no test coverage detected