Home
last modified time | relevance | path

Searched refs:secsz (Results 1 – 18 of 18) sorted by relevance

/freebsd/usr.bin/mkimg/
H A Dimage.c95 max = secsz / sizeof(uint64_t); in is_empty_sector()
113 unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; in image_swap_alloc()
141 (lba_t)(ch->ch_block + (ch->ch_size / secsz)) > blk) { in image_chunk_find()
173 ptr = calloc(1, secsz); in image_chunk_memory()
184 ch->ch_size = (blk - ch->ch_block) * secsz; in image_chunk_memory()
192 if (ch->ch_size > secsz) { in image_chunk_memory()
199 ch->ch_size = secsz; in image_chunk_memory()
201 new->ch_size -= secsz; in image_chunk_memory()
219 from = (ch != NULL) ? ch->ch_block + (ch->ch_size / secsz) : 0LL; in image_chunk_skipto()
227 if ((uintmax_t)(to - from) > (uintmax_t)(SIZE_MAX / secsz)) in image_chunk_skipto()
[all …]
H A Dmkimg.c73 u_int secsz = 512; variable
336 len = (len + secsz - 1) & ~(secsz - 1); in sparse_write()
346 len &= ~(secsz - 1); in sparse_write()
389 min_capsz = (min_capacity + secsz - 1) / secsz; in capacity_resize()
390 max_capsz = (max_capacity + secsz - 1) / secsz; in capacity_resize()
479 blkoffset = (byteoffset + secsz - 1) / secsz; in mkimg()
514 part->size = (bytesize + secsz - 1) / secsz; in mkimg()
516 bytesize = part->size * secsz; in mkimg()
635 error = parse_uint32(&secsz, 512, INT_MAX+1U, optarg); in main()
636 if (error == 0 && !pwr_of_two(secsz)) in main()
[all …]
H A Dgpt.c140 eps = secsz / sizeof(struct gpt_ent); in gpt_tblsz()
141 return (MAX(howmany(GPT_MIN_RESERVED, secsz), howmany(nparts, eps))); in gpt_tblsz()
164 pmbr = malloc(secsz); in gpt_write_pmbr()
169 memset(pmbr + DOSPARTOFF, 0, secsz - DOSPARTOFF); in gpt_write_pmbr()
171 memset(pmbr, 0, secsz); in gpt_write_pmbr()
193 tbl = calloc(tblsz, secsz); in gpt_mktbl()
257 hdr = malloc(secsz); in gpt_write()
262 memset(hdr, 0, secsz); in gpt_write()
270 le32enc(&hdr->hdr_entries, tblsz * secsz / sizeof(struct gpt_ent)); in gpt_write()
272 crc = crc32(tbl, tblsz * secsz); in gpt_write()
H A Dvhd.c267 imagesz = vhd_resize(imgsz * secsz); in vhd_dyn_resize()
268 return (image_set_size(imagesz / secsz)); in vhd_dyn_resize()
284 rawsz = image_get_size() * secsz; in vhd_dyn_write()
309 blkcnt = VHD_BLOCK_SIZE / secsz; in vhd_dyn_write()
330 blkcnt = VHD_BLOCK_SIZE / secsz; in vhd_dyn_write()
332 nblks = rawsz / secsz; in vhd_dyn_write()
380 imagesz = vhd_resize(imgsz * secsz); in vhd_fix_resize()
385 return (image_set_size(imagesz / secsz)); in vhd_fix_resize()
399 imagesz = image_get_size() * secsz; in vhd_fix_write()
H A Dbsd.c54 blk += BSD_BOOTBLOCK_SIZE / secsz; in bsd_metadata()
77 memset(buf + secsz, 0, sizeof(struct disklabel)); in bsd_write()
85 d = (void *)(buf + secsz); in bsd_write()
87 le32enc(&d->d_secsize, secsz); in bsd_write()
117 error = image_write(0, buf, BSD_BOOTBLOCK_SIZE / secsz); in bsd_write()
H A Dapm.c68 buf = calloc(nparts + 2, secsz); in apm_write()
73 be16enc(&ddr->ddr_blksize, secsz); in apm_write()
77 ent = (void *)(buf + secsz); in apm_write()
86 ent = (void *)(buf + (part->index + 2) * secsz); in apm_write()
H A Dvmdk.c93 imagesz = imgsz * secsz; in vmdk_resize()
102 return (image_set_size(imagesz / secsz)); in vmdk_resize()
118 imagesz = (image_get_size() * secsz) / VMDK_SECTOR_SIZE; in vmdk_write()
192 blkcnt = (grainsz * VMDK_SECTOR_SIZE) / secsz; in vmdk_write()
238 blkcnt = (grainsz * VMDK_SECTOR_SIZE) / secsz; in vmdk_write()
H A Dmbr.c80 mbr = malloc(secsz); in mbr_write()
85 memset(mbr + DOSPARTOFF, 0, secsz - DOSPARTOFF); in mbr_write()
87 memset(mbr, 0, secsz); in mbr_write()
H A Dmkimg.h58 extern u_int secsz; /* Logical block size. */
65 lba_t b = blksz / secsz; in round_block()
H A Dvhdx.c213 imagesz = imgsz * secsz; in vhdx_resize()
215 return (image_set_size(imagesz / secsz)); in vhdx_resize()
380 le32enc(metadata + data_ptr, secsz); in vhdx_write_metadata()
417 chunk_ratio = ((1024*1024*8ULL) * secsz) / PAYLOAD_BLOCK_SIZE; in vhdx_write_bat()
485 rawsz = image_get_size() * secsz; in vhdx_write()
H A Dqcow.c104 imagesz = round_clstr(imgsz * secsz); in qcow_resize()
110 return (image_set_size(imagesz / secsz)); in qcow_resize()
145 blk_clstrsz = clstrsz / secsz; in qcow_write()
147 imagesz = blk_imgsz * secsz; in qcow_write()
H A Debr.c76 ebr = malloc(secsz); in ebr_write()
79 memset(ebr, 0, secsz); in ebr_write()
/freebsd/tests/sys/geom/class/eli/
H A Dunaligned_io.c55 unsigned int offsets, secsz; in main() local
66 if (ioctl(fd, DIOCGSECTORSIZE, &secsz) != 0) in main()
68 if (secsz == 0) in main()
72 if (disksz / secsz < 2) in main()
74 iosz = 2 * secsz; in main()
76 bufsz = iosz + secsz; in main()
111 errx(1, "read mismatch at offset %u/%u", i, secsz); in main()
127 errx(1, "write mismatch at offset %u/%u", i, secsz); in main()
/freebsd/stand/libsa/zfs/
H A Dzfs.c462 unsigned secsz, do_tail_read; in vdev_read() local
470 ret = ioctl(fd, DIOCGSECTORSIZE, &secsz); in vdev_read()
503 start_sec = offset / secsz; in vdev_read()
504 head = offset % secsz; in vdev_read()
505 total_size = roundup2(head + bytes, secsz); in vdev_read()
507 do_tail_read = ((tail > 0) && (head + bytes > secsz)); in vdev_read()
510 full_sec_size -= secsz; in vdev_read()
512 full_sec_size -= secsz; in vdev_read()
515 if ((head > 0) || do_tail_read || bytes < secsz) { in vdev_read()
516 bouncebuf = malloc(secsz); in vdev_read()
[all …]
/freebsd/sys/geom/part/
H A Dg_part_mbr.c178 uint16_t secsz; in mbr_probe_bpb() local
182 secsz = le16dec(bpb); in mbr_probe_bpb()
183 if (secsz < 512 || secsz > 4096 || !PO2(secsz)) in mbr_probe_bpb()
/freebsd/contrib/mandoc/
H A Dcgi.c379 int namesz, secsz; in resp_begin_html() local
401 secsz = strlen(sec); in resp_begin_html()
407 secsz = name - cp - 1; in resp_begin_html()
413 printf("(%.*s)", secsz, sec); in resp_begin_html()
/freebsd/stand/libsa/
H A Ddosfs.c224 unsigned secsz; in dos_mount_impl() local
229 err = ioctl(fd->f_id, DIOCGSECTORSIZE, &secsz); in dos_mount_impl()
234 buf = malloc(secsz); in dos_mount_impl()
238 if ((err = ioget(fs, 0, buf, secsz)) || in dos_mount_impl()
/freebsd/lib/geom/part/
H A Dgeom_part.c627 off_t length, secsz; in gpart_show_geom() local
661 secsz = pp->lg_sectorsize; in gpart_show_geom()
682 fmtsize((sector - first) * secsz)); in gpart_show_geom()
703 fmtsize(length * secsz)); in gpart_show_geom()