Lines Matching refs:chs
258 // empty partition), 0 if the value is outside that range, and -1 if chs is
260 int MBRPart::LBAtoCHS(uint32_t lba, uint8_t * chs) {
266 if (chs != NULL) {
269 chs[0] = chs[1] = chs[2] = UINT8_C(0);
274 chs[0] = 254;
275 chs[1] = chs[2] = 255;
287 chs[0] = (uint8_t) head;
291 chs[1] = (uint8_t) ((sector + 1) + (cylinder >> 8) * 64);
292 chs[2] = (uint8_t) (cylinder & UINT32_C(0xFF));
297 } else { // Invalid (NULL) chs pointer