Lines Matching refs:chs
694 // empty partition), 0 if the value is outside that range, and -1 if chs is
696 int BasicMBRData::LBAtoCHS(uint64_t lba, uint8_t * chs) {
702 if (chs != NULL) {
705 chs[0] = chs[1] = chs[2] = UINT8_C(0);
710 chs[0] = 254;
711 chs[1] = chs[2] = 255;
723 chs[0] = (uint8_t) head;
727 chs[1] = (uint8_t) ((sector + 1) + (cylinder >> 8) * 64);
728 chs[2] = (uint8_t) (cylinder & UINT64_C(0xFF));
733 } else { // Invalid (NULL) chs pointer