// Desliga um determinado bit do bitmap void setBitOff(unsigned int block) { // bit alterado int bitOffset = block%BITS_PER_WORD; // caracter alterado int wordOffset = block/BITS_PER_WORD; if(block < 0) return; if(bitmap == NULL) loadBitmap(); bitmap[wordOffset] &= ~(1 << bitOffset); writeBitMap(); }
int setFreeBlockNumber(SUPER_BLOCK * superBlockP, int pos) { setZero(superBlockP->bBitMap, getBlockBitMapByteCount(superBlockP), pos); writeBitMap(superBlockP, dataFp); return 0; }
unsigned int getFreeInodeNumber(SUPER_BLOCK * superBlockP) { unsigned int offset = findZero(superBlockP->iBitMap, getInodeBitMapByteCount(superBlockP)); writeBitMap(superBlockP, dataFp); return offset; }