Lines Matching defs:secsz
254 count *= gpt->secsz;
259 ofs = lba * gpt->secsz;
274 count = (size_t)(map->map_size * gpt->secsz);
275 ofs = map->map_start * gpt->secsz;
409 blocks = tblsz / gpt->secsz + ((tblsz % gpt->secsz) ? 1 : 0);
482 gpt_open(const char *dev, int flags, int verbose, off_t mediasz, u_int secsz,
498 gpt->secsz = secsz;
518 if (gpt->secsz == 0) {
520 if (ioctl(gpt->fd, DIOCGSECTORSIZE, &gpt->secsz) == -1) {
525 if (gpt->secsz == 0) {
544 if (gpt->secsz == 0)
545 gpt->secsz = 512; /* Fixed size for files. */
547 if (gpt->sb.st_size % gpt->secsz) {
548 gpt_warn(gpt, "Media size not a multiple of sector size (%u)\n", gpt->secsz);
563 devsz = gpt->mediasz / gpt->secsz;
572 (uintmax_t)gpt->mediasz, gpt->secsz, (uintmax_t)devsz);
829 return gpt->mediasz / gpt->secsz - 1LL;
857 if ((uint64_t)(blocks - 1) * gpt->secsz >
859 blocks = (off_t)((parts * sizeof(struct gpt_ent)) / gpt->secsz);
860 if ((parts * sizeof(struct gpt_ent)) % gpt->secsz)
892 if ((p = calloc((size_t)blocks, gpt->secsz)) == NULL) {
919 hdr->hdr_entries = htole32((uint32_t)(((uint64_t)blocks * gpt->secsz) /
946 memcpy(gpt->tpg->map_data, gpt->gpt->map_data, gpt->secsz);
968 *size = sectors * gpt->secsz;
1160 if (alignment % gpt->secsz != 0) {
1162 "sector size (%#x)", (uintmax_t)alignment, gpt->secsz);
1166 if (size % gpt->secsz != 0) {
1168 "sector size (%#x)", (uintmax_t)size, gpt->secsz);
1172 return size / gpt->secsz;
1429 if ((p = calloc(1, gpt->secsz)) == NULL) {