Lines Matching refs:geom
115 vhd_geometry(uint64_t image_size, struct vhd_geom *geom)
126 geom->cylinders = (ncyls != 0) ? ncyls :
128 geom->heads = nheads;
129 geom->sectors = nsecs;
136 geom->cylinders = imgsz / (16 * 255);
137 geom->heads = 16;
138 geom->sectors = 255;
141 geom->sectors = 17;
143 geom->heads = (cth + 1023) / 1024;
144 if (geom->heads < 4)
145 geom->heads = 4;
146 if (cth >= (geom->heads * 1024) || geom->heads > 16) {
147 geom->heads = 16;
148 geom->sectors = 31;
151 if (cth >= (geom->heads * 1024)) {
152 geom->heads = 16;
153 geom->sectors = 63;
156 geom->cylinders = cth / geom->heads;
162 struct vhd_geom geom;
177 vhd_geometry(newsz, &geom);
178 newsz = (int64_t)geom.cylinders * geom.heads *
179 geom.sectors * VHD_SECTOR_SIZE;
182 newsz += geom.heads * geom.sectors * VHD_SECTOR_SIZE;