Lines Matching defs:secsz
252 count *= gpt->secsz;
257 ofs = lba * gpt->secsz;
272 count = (size_t)(map->map_size * gpt->secsz);
273 ofs = map->map_start * gpt->secsz;
407 blocks = tblsz / gpt->secsz + ((tblsz % gpt->secsz) ? 1 : 0);
480 gpt_open(const char *dev, int flags, int verbose, off_t mediasz, u_int secsz,
496 gpt->secsz = secsz;
516 if (gpt->secsz == 0) {
518 if (ioctl(gpt->fd, DIOCGSECTORSIZE, &gpt->secsz) == -1) {
523 if (gpt->secsz == 0) {
542 if (gpt->secsz == 0)
543 gpt->secsz = 512; /* Fixed size for files. */
545 if (gpt->sb.st_size % gpt->secsz) {
546 gpt_warn(gpt, "Media size not a multiple of sector size (%u)\n", gpt->secsz);
561 devsz = gpt->mediasz / gpt->secsz;
570 (uintmax_t)gpt->mediasz, gpt->secsz, (uintmax_t)devsz);
827 return gpt->mediasz / gpt->secsz - 1LL;
855 if ((uint64_t)(blocks - 1) * gpt->secsz >
857 blocks = (off_t)((parts * sizeof(struct gpt_ent)) / gpt->secsz);
858 if ((parts * sizeof(struct gpt_ent)) % gpt->secsz)
889 if ((p = calloc((size_t)blocks, gpt->secsz)) == NULL) {
916 hdr->hdr_entries = htole32((uint32_t)(((uint64_t)blocks * gpt->secsz) /
943 memcpy(gpt->tpg->map_data, gpt->gpt->map_data, gpt->secsz);
965 *size = sectors * gpt->secsz;
1158 if (alignment % gpt->secsz != 0) {
1160 "sector size (%#x)", (uintmax_t)alignment, gpt->secsz);
1164 if (size % gpt->secsz != 0) {
1166 "sector size (%#x)", (uintmax_t)size, gpt->secsz);
1170 return size / gpt->secsz;
1427 if ((p = calloc(1, gpt->secsz)) == NULL) {