Lines Matching refs:VHD_SECTOR_SIZE
57 #define VHD_SECTOR_SIZE 512 macro
58 #define VHD_BLOCK_SIZE (4096 * VHD_SECTOR_SIZE) /* 2MB blocks */
95 _Static_assert(sizeof(struct vhd_footer) == VHD_SECTOR_SIZE,
118 imgsz = image_size / VHD_SECTOR_SIZE; in vhd_geometry()
177 geom.sectors * VHD_SECTOR_SIZE; in vhd_resize()
180 newsz += geom.heads * geom.sectors * VHD_SECTOR_SIZE; in vhd_resize()
258 _Static_assert(sizeof(struct vhd_dyn_header) == VHD_SECTOR_SIZE * 2,
304 batsz = (batsz + VHD_SECTOR_SIZE - 1) & ~(VHD_SECTOR_SIZE - 1); in vhd_dyn_write()
310 sector = (sizeof(footer) + sizeof(header) + batsz) / VHD_SECTOR_SIZE; in vhd_dyn_write()
315 sector += (VHD_BLOCK_SIZE / VHD_SECTOR_SIZE) + 1; in vhd_dyn_write()
324 bitmap = malloc(VHD_SECTOR_SIZE); in vhd_dyn_write()
327 memset(bitmap, 0xff, VHD_SECTOR_SIZE); in vhd_dyn_write()
338 if (sparse_write(fd, bitmap, VHD_SECTOR_SIZE) < 0) { in vhd_dyn_write()