Lines Matching refs:sectorsize
295 MIN(pp->mediasize / pp->sectorsize - 1, UINT32_MAX));
394 last = (pp->mediasize / pp->sectorsize) - 1;
405 buf = g_read_data(cp, table->lba[elt] * pp->sectorsize, pp->sectorsize,
415 if (sz < 92 || sz > pp->sectorsize)
461 (hdr->hdr_entries * hdr->hdr_entsz + pp->sectorsize - 1) /
462 pp->sectorsize - 1;
504 sectors = (tblsz + pp->sectorsize - 1) / pp->sectorsize;
505 buf = g_malloc(sectors * pp->sectorsize, M_WAITOK | M_ZERO);
506 for (idx = 0; idx < sectors; idx += MAXPHYS / pp->sectorsize) {
507 size = (sectors - idx > MAXPHYS / pp->sectorsize) ? MAXPHYS:
508 (sectors - idx) * pp->sectorsize;
509 p = g_read_data(cp, (table->lba[elt] + idx) * pp->sectorsize,
515 bcopy(p, buf + idx * pp->sectorsize, size);
643 pp->sectorsize - 1) / pp->sectorsize;
644 if (pp->sectorsize < MBRSIZE ||
646 pp->sectorsize)
682 table->lba[GPT_ELT_SECHDR] == pp->mediasize / pp->sectorsize - 1)
812 if (pp->sectorsize < MBRSIZE || pp->mediasize < 6 * pp->sectorsize)
821 buf = g_read_data(cp, 0L, pp->sectorsize, &error);
834 buf = g_read_data(cp, pp->sectorsize, pp->sectorsize, &error);
845 buf = g_read_data(cp, pp->mediasize - pp->sectorsize, pp->sectorsize,
868 last = (pp->mediasize / pp->sectorsize) - 1;
871 buf = g_read_data(cp, 0, pp->sectorsize, &error);
961 pp->sectorsize / table->hdr->hdr_entsz;
1054 MIN(pp->mediasize / pp->sectorsize - 1, UINT32_MAX));
1124 pp->sectorsize - 1) / pp->sectorsize;
1131 buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO);
1133 error = g_write_data(cp, 0, buf, pp->sectorsize);
1139 buf = g_malloc((tblsz + 1) * pp->sectorsize, M_WAITOK | M_ZERO);
1155 bp = buf + pp->sectorsize + table->hdr->hdr_entsz * index;
1165 crc = crc32(buf + pp->sectorsize,
1177 for (index = 0; index < tblsz; index += MAXPHYS / pp->sectorsize) {
1179 (table->lba[GPT_ELT_PRITBL] + index) * pp->sectorsize,
1180 buf + (index + 1) * pp->sectorsize,
1181 (tblsz - index > MAXPHYS / pp->sectorsize) ? MAXPHYS:
1182 (tblsz - index) * pp->sectorsize);
1186 error = g_write_data(cp, table->lba[GPT_ELT_PRIHDR] * pp->sectorsize,
1187 buf, pp->sectorsize);
1199 for (index = 0; index < tblsz; index += MAXPHYS / pp->sectorsize) {
1201 (table->lba[GPT_ELT_SECTBL] + index) * pp->sectorsize,
1202 buf + (index + 1) * pp->sectorsize,
1203 (tblsz - index > MAXPHYS / pp->sectorsize) ? MAXPHYS:
1204 (tblsz - index) * pp->sectorsize);
1208 error = g_write_data(cp, table->lba[GPT_ELT_SECHDR] * pp->sectorsize,
1209 buf, pp->sectorsize);
1224 last = pp->mediasize / pp->sectorsize - 1;
1226 pp->sectorsize - 1) / pp->sectorsize;