Lines Matching refs:tempMBR
143 TempMBR tempMBR; in ReadMBRData() local
156 if (myDisk->Read(&tempMBR, 512)) in ReadMBRData()
162 code[i] = tempMBR.code[i]; in ReadMBRData()
163 diskSignature = tempMBR.diskSignature; in ReadMBRData()
164 nulls = tempMBR.nulls; in ReadMBRData()
166 partitions[i] = tempMBR.partitions[i]; in ReadMBRData()
170 MBRSignature = tempMBR.MBRSignature; in ReadMBRData()
347 TempMBR tempMBR; in WriteMBRData() local
352 memcpy(tempMBR.code, code, 440); in WriteMBRData()
353 tempMBR.diskSignature = diskSignature; in WriteMBRData()
354 tempMBR.nulls = nulls; in WriteMBRData()
355 tempMBR.MBRSignature = MBRSignature; in WriteMBRData()
357 partitions[i].StoreInStruct(&tempMBR.partitions[i]); in WriteMBRData()
364 allOK = allOK && WriteMBRData(tempMBR, theDisk, 0); in WriteMBRData()
367 tempMBR.diskSignature = 0; in WriteMBRData()
369 tempMBR.partitions[i].firstLBA = tempMBR.partitions[i].lengthLBA = 0; in WriteMBRData()
370 tempMBR.partitions[i].partitionType = 0x00; in WriteMBRData()
372 tempMBR.partitions[i].firstSector[j] = 0; in WriteMBRData()
373 tempMBR.partitions[i].lastSector[j] = 0; in WriteMBRData()
381 partitions[partNum].StoreInStruct(&tempMBR.partitions[0]); in WriteMBRData()
382 tempMBR.partitions[0].firstLBA = 1; in WriteMBRData()
386 tempMBR.partitions[1].partitionType = 0x0f; in WriteMBRData()
387 … tempMBR.partitions[1].firstLBA = (uint32_t) (partitions[next].GetStartLBA() - extFirstLBA - 1); in WriteMBRData()
388 tempMBR.partitions[1].lengthLBA = (uint32_t) (partitions[next].GetLengthLBA() + 1); in WriteMBRData()
389 LBAtoCHS((uint64_t) tempMBR.partitions[1].firstLBA, in WriteMBRData()
390 (uint8_t *) &tempMBR.partitions[1].firstSector); in WriteMBRData()
391 LBAtoCHS(tempMBR.partitions[1].lengthLBA - extFirstLBA, in WriteMBRData()
392 (uint8_t *) &tempMBR.partitions[1].lastSector); in WriteMBRData()
394 tempMBR.partitions[1].partitionType = 0x00; in WriteMBRData()
395 tempMBR.partitions[1].firstLBA = 0; in WriteMBRData()
396 tempMBR.partitions[1].lengthLBA = 0; in WriteMBRData()
399 allOK = WriteMBRData(tempMBR, theDisk, writeEbrTo); in WriteMBRData()
400 writeEbrTo = (uint64_t) tempMBR.partitions[1].firstLBA + (uint64_t) extFirstLBA; in WriteMBRData()