Lines Matching full:part
86 static void lba2chs(unsigned long lba_addr, CHS *chs, PARTITION *part)
91 abss = (lba_addr >> 9) + part->start;
92 chs->cyl = abss / (part->sects * part->heads);
93 chs->head = (abss / part->sects) % part->heads;
94 chs->sector = (abss % part->sects) + 1;
145 static io_channel alloc_io_channel(PARTITION *part)
155 ioch->name = (char *)malloc(strlen(part->dev)+1);
160 strcpy(ioch->name, part->dev);
161 ioch->private_data = part;
179 PARTITION *part;
210 part = (PARTITION*)malloc(sizeof(PARTITION));
211 if (!part)
235 part->phys = 0x80;
236 part->phys += toupper(tmp[2]) - 'A';
241 part->pno = isdigit((int)tmp[3]) ? tmp[3] - '0' - 1: 0;
243 part->pno = 0xFF;
248 part->phys = isdigit((int)tmp[2]) ? tmp[2] - '0' : 0;
250 part->phys = 0x00; /* We'll assume /dev/fd0 */
258 if(part->phys < 0x80)
265 part->dev = strdup(dev);
271 part->phys,
281 free(part->dev);
282 free(part);
289 part->cyls = (unsigned short)(((sec[0] >> 6) << 8) + sec[1] + 1);
290 part->heads = sec[3] + 1;
291 part->sects = sec[0] & 0x3F;
296 _dio_hw_error = biosdisk(DISK_READ, part->phys, 0, 0, 1, 1, sec);
301 free(part->dev);
302 free(part);
307 pent = scan_partition_table(pent, part->phys, &part->pno);
311 _dio_error = part->pno == 0xFE ? ERR_EMPTYPART :
312 part->pno == 0xFD ? ERR_LINUXSWAP : ERR_NOTEXT2FS;
313 free(part->dev);
314 free(part);
327 part->start = fsec + fhead * part->sects + fcyl *
328 (part->heads * part->sects) - 1;
329 part->len = pent->size;
337 free(part);
341 partitions[npart++] = active = part;
371 PARTITION *part;
377 part = (PARTITION*)channel->private_data;
382 lba2chs(loc, &chs, part);
389 part->phys,
408 PARTITION *part;
414 part = (PARTITION*)channel->private_data;
427 lba2chs(loc, &chs, part);
429 part->phys,