Home
last modified time | relevance | path

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

/freebsd/usr.bin/mkimg/
H A Dimage.c97 max = secsz / sizeof(uint64_t); in is_empty_sector()
115 unit = (secsz > image_swap_pgsz) ? secsz : image_swap_pgsz; in image_swap_alloc()
143 (lba_t)(ch->ch_block + (ch->ch_size / secsz)) > blk) { in image_chunk_find()
175 ptr = calloc(1, secsz); in image_chunk_memory()
186 ch->ch_size = (blk - ch->ch_block) * secsz; in image_chunk_memory()
194 if (ch->ch_size > secsz) { in image_chunk_memory()
201 ch->ch_size = secsz; in image_chunk_memory()
203 new->ch_size -= secsz; in image_chunk_memory()
221 from = (ch != NULL) ? ch->ch_block + (ch->ch_size / secsz) : 0LL; in image_chunk_skipto()
229 if ((uintmax_t)(to - from) > (uintmax_t)(SIZE_MAX / secsz)) in image_chunk_skipto()
[all …]
H A Dmkimg.c78 u_int secsz = 512; variable
346 len = (len + secsz - 1) & ~(secsz - 1); in sparse_write()
356 len &= ~(secsz - 1); in sparse_write()
399 min_capsz = (min_capacity + secsz - 1) / secsz; in capacity_resize()
400 max_capsz = (max_capacity + secsz - 1) / secsz; in capacity_resize()
507 blkoffset = (byteoffset + secsz - 1) / secsz; in mkimg()
542 part->size = (bytesize + secsz - 1) / secsz; in mkimg()
544 bytesize = part->size * secsz; in mkimg()
679 error = parse_uint32(&secsz, 512, INT_MAX+1U, optarg); in main()
680 if (error == 0 && !pwr_of_two(secsz)) in main()
[all …]
H A Dgpt.c148 eps = secsz / sizeof(struct gpt_ent); in gpt_tblsz()
149 return (MAX(howmany(GPT_MIN_RESERVED, secsz), howmany(nparts, eps))); in gpt_tblsz()
172 pmbr = malloc(secsz); in gpt_write_pmbr()
177 memset(pmbr + DOSPARTOFF, 0, secsz - DOSPARTOFF); in gpt_write_pmbr()
179 memset(pmbr, 0, secsz); in gpt_write_pmbr()
201 tbl = calloc(tblsz, secsz); in gpt_mktbl()
265 hdr = malloc(secsz); in gpt_write()
270 memset(hdr, 0, secsz); in gpt_write()
278 le32enc(&hdr->hdr_entries, tblsz * secsz / sizeof(struct gpt_ent)); in gpt_write()
280 crc = crc32(tbl, tblsz * secsz); in gpt_write()
H A Dvhd.c269 imagesz = vhd_resize(imgsz * secsz); in vhd_dyn_resize()
270 return (image_set_size(imagesz / secsz)); in vhd_dyn_resize()
286 rawsz = image_get_size() * secsz; in vhd_dyn_write()
311 blkcnt = VHD_BLOCK_SIZE / secsz; in vhd_dyn_write()
332 blkcnt = VHD_BLOCK_SIZE / secsz; in vhd_dyn_write()
334 nblks = rawsz / secsz; in vhd_dyn_write()
382 imagesz = vhd_resize(imgsz * secsz); in vhd_fix_resize()
387 return (image_set_size(imagesz / secsz)); in vhd_fix_resize()
401 imagesz = image_get_size() * secsz; in vhd_fix_write()
H A Dbsd.c56 blk += BSD_BOOTBLOCK_SIZE / secsz; in bsd_metadata()
79 memset(buf + secsz, 0, sizeof(struct disklabel)); in bsd_write()
87 d = (void *)(buf + secsz); in bsd_write()
89 le32enc(&d->d_secsize, secsz); in bsd_write()
119 error = image_write(0, buf, BSD_BOOTBLOCK_SIZE / secsz); in bsd_write()
H A Dapm.c70 buf = calloc(nparts + 2, secsz); in apm_write()
75 be16enc(&ddr->ddr_blksize, secsz); in apm_write()
79 ent = (void *)(buf + secsz); in apm_write()
88 ent = (void *)(buf + (part->index + 2) * secsz); in apm_write()
H A Dvmdk.c95 imagesz = imgsz * secsz; in vmdk_resize()
104 return (image_set_size(imagesz / secsz)); in vmdk_resize()
120 imagesz = (image_get_size() * secsz) / VMDK_SECTOR_SIZE; in vmdk_write()
194 blkcnt = (grainsz * VMDK_SECTOR_SIZE) / secsz; in vmdk_write()
240 blkcnt = (grainsz * VMDK_SECTOR_SIZE) / secsz; in vmdk_write()
H A Dmbr.c82 mbr = malloc(secsz); in mbr_write()
87 memset(mbr + DOSPARTOFF, 0, secsz - DOSPARTOFF); in mbr_write()
89 memset(mbr, 0, secsz); in mbr_write()
H A Dmkimg.h63 extern u_int secsz; /* Logical block size. */
70 lba_t b = blksz / secsz; in round_block()
H A Dvhdx.c215 imagesz = imgsz * secsz; in vhdx_resize()
217 return (image_set_size(imagesz / secsz)); in vhdx_resize()
382 le32enc(metadata + data_ptr, secsz); in vhdx_write_metadata()
419 chunk_ratio = ((1024*1024*8ULL) * secsz) / PAYLOAD_BLOCK_SIZE; in vhdx_write_bat()
487 rawsz = image_get_size() * secsz; in vhdx_write()
H A Dqcow.c106 imagesz = round_clstr(imgsz * secsz); in qcow_resize()
112 return (image_set_size(imagesz / secsz)); in qcow_resize()
147 blk_clstrsz = clstrsz / secsz; in qcow_write()
149 imagesz = blk_imgsz * secsz; in qcow_write()
H A Debr.c78 ebr = malloc(secsz); in ebr_write()
81 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.c225 unsigned secsz; in dos_mount_impl() local
230 err = ioctl(fd->f_id, DIOCGSECTORSIZE, &secsz); in dos_mount_impl()
235 buf = malloc(secsz); in dos_mount_impl()
239 if ((err = ioget(fs, 0, buf, secsz)) || in dos_mount_impl()
/freebsd/lib/geom/part/
H A Dgeom_part.c619 off_t length, secsz; in gpart_show_geom() local
653 secsz = pp->lg_sectorsize; in gpart_show_geom()
682 "true", (intmax_t)(sector - first) * secsz); in gpart_show_geom()
737 wname, "", "true", (intmax_t)length * secsz); in gpart_show_geom()