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

Function adfFreeFileBlocks

dep/adflib/src/adf_file.c:144–163  ·  view source on GitHub ↗

* adfFreeFileBlocks * */

Source from the content-addressed store, hash-verified

142 *
143 */
144RETCODE adfFreeFileBlocks(struct Volume* vol, struct bFileHeaderBlock *entry)
145{
146 int i;
147 struct FileBlocks fileBlocks;
148 RETCODE rc = RC_OK;
149
150 adfGetFileBlocks(vol,entry,&fileBlocks);
151
152 for(i=0; i<fileBlocks.nbData; i++) {
153 adfSetBlockFree(vol, fileBlocks.data[i]);
154 }
155 for(i=0; i<fileBlocks.nbExtens; i++) {
156 adfSetBlockFree(vol, fileBlocks.extens[i]);
157 }
158
159 free(fileBlocks.data);
160 free(fileBlocks.extens);
161
162 return rc;
163}
164
165
166/*

Callers 1

adfRemoveEntryFunction · 0.85

Calls 2

adfGetFileBlocksFunction · 0.85
adfSetBlockFreeFunction · 0.85

Tested by

no test coverage detected