Lines Matching defs:fdisk
144 struct fdisk_info *fdisk);
846 * On x86 Solaris, the partitioning is done in two levels, fdisk and Solaris
848 * also it is assumed to be only VTOC, no fdisk.
852 * in fdisk table.
855 * SCSI/ATAPI, floppy, pcmcia : don't check for fdisk.
857 * x86 : floppy, pcmcia : Don't check for fdisk. DKIOCGGEOM is sufficient.
858 * SCSI/ATAPI : Check for fdisk.
888 struct fdisk_info fdisk;
916 * Try to get the fdisk information if available.
918 if (get_fdisk(handle, fd, 0, &fdisk) >= 0) {
919 /* fdisk table on disk */
922 if (fdisk.part[i].systid == SUNIXOS ||
923 fdisk.part[i].systid == SUNIXOS2) {
927 if (fdisk.part[i].bootid == ACTIVE)
941 media_size = (diskaddr_t)fdisk.part[sol_part].numsect;
946 DPRINTF("Didn't get fdisk\n");
948 * No fdisk partition available. Assume a 100% Solaris.
957 /* On x86 platform 1 cylinder is used for fdisk table */
1117 struct fdisk_info *fdisk)
1187 DPRINTF("fdisk: Invalid master boot file \n");
1199 fdisk->part[i].bootid = part->bootid;
1201 /* Hmmm...not a valid fdisk! */
1204 fdisk->part[i].systid = part->systid;
1208 fdisk->part[i].relsect = lel(GET_32(&(part->relsect)));
1209 fdisk->part[i].numsect = lel(GET_32(&(part->numsect)));
1213 DPRINTF1("\trel sector 0x%x\n", fdisk->part[i].relsect);
1214 DPRINTF1("\tnum sector 0x%x\n", fdisk->part[i].numsect);
1235 * Create a fdisk partition,
1239 * But the capacity is reduced by 1 cyl, to leave space for fdisk table.
1342 DPRINTF("Writing default fdisk table and vtoc\n");
1501 * If there is a valid fdisk table,
1505 * Then erase the 0th sector (the home for vtoc and fdisk) of the disk.
1506 * Note that teh vtoc on x86 resides in one of the fdisk partition.
1514 struct fdisk_info fdisk;
1523 /* Get fdisk info. */
1524 if (get_fdisk(handle, fd, 0, &fdisk) >= 0) {
1525 /* Got a valid fdisk */
1528 if (fdisk.part[i].numsect == 0)
1530 if ((fdisk.part[i].systid == UNUSED) ||
1531 (fdisk.part[i].systid == 0))
1534 if (fdisk.part[i].systid == SUNIXOS ||
1535 fdisk.part[i].systid == SUNIXOS2) {
1537 sol_offset = fdisk.part[i].relsect;
1538 sol_size = fdisk.part[i].numsect;
1539 if (fdisk.part[i].bootid == ACTIVE)
1542 } else if ((fdisk.part[i].bootid == ACTIVE) &&
1545 sol_offset = fdisk.part[i].relsect;
1546 sol_size = fdisk.part[i].numsect;
1552 erase(handle, (diskaddr_t)fdisk.part[i].relsect,
1553 (diskaddr_t)fdisk.part[i].numsect);
1560 /* fdisk x86 Solaris partition */
1572 /* No valid vtoc, erase fdisk table. */
1577 /* Sparc Solaris or x86 solaris with faked fdisk */
1618 * If x86 fdisk solaris partition, erase the vtoc also.