191: buf[4] = buf[80];
192: buf[5] = CnvLeH(buf[53]) & 0x00FF; /* Upper level is the internal flag */
193: buf[7] = buf[54];
199: buf[127] = 0; /* MSN No Support */
200: buf[5] = CnvLeH(buf[5]);
201:
207: /* Set the number of sectors for "R/W- MULTIPLE" : any of 0,2,4,8,16,and 32 */
208: n = CnvLeH(buf[47]) & 0xFF; /* Maximum value */
209: for (i = 32; i > n; i >>= 1);
241: /* Fetch the information of "Cyl", "Head", and "Sec" */
242: cyl = CnvLeH(buf[1]); /* The number of cylinders */
243: head = CnvLeH(buf[3]); /* The number of heads */
244: sec = CnvLeH(buf[6]); /* The number of sectors */
245: tsec = cyl * head * sec; /* The total number of sectors */
246:
247: n = CnvLeH(buf[80]);
248: if ((n & ~0x7FFE) == 0 && n >= (1 << 3)) {
250: } else {
251: uselba = (CnvLeH(buf[49]) & 0x200) ? TRUE : FALSE;
252: }
276: /* Use "CHS" when "LBA" is unused (translation mode) */
277: if (!uselba && (CnvLeH(buf[53]) & 0x1) != 0) {
278: cyl = CnvLeH(buf[54]); /* The number of the current cylinders */
279: head = CnvLeH(buf[55]); /* The number of the current heads */
280: sec = CnvLeH(buf[56]); /* The number of the current sectors */
281: tsec = cyl * head * sec; /* The total number of sectors */