* adfFreeFileBlocks * */
| 142 | * |
| 143 | */ |
| 144 | RETCODE 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 | /* |
no test coverage detected