Lines Matching refs:geom
140 get_drive_geometry (struct geometry *geom, char **map, int drive)
144 if (geom->flags == -1)
150 fd = geom->flags;
153 geom->sector_size = SECTOR_SIZE;
168 geom->cylinders = hdg.cylinders;
169 geom->heads = hdg.heads;
170 geom->sectors = hdg.sectors;
171 geom->total_sectors = nr;
191 geom->total_sectors = media_size / sector_size;
194 geom->sectors = tmp;
196 geom->sectors = 63;
198 geom->heads = tmp;
199 else if (geom->total_sectors <= 63 * 1 * 1024)
200 geom->heads = 1;
201 else if (geom->total_sectors <= 63 * 16 * 1024)
202 geom->heads = 16;
204 geom->heads = 255;
206 geom->cylinders = (geom->total_sectors
207 / geom->heads
208 / geom->sectors);
221 geom->cylinders = hdg.d_ncylinders;
222 geom->heads = hdg.d_ntracks;
223 geom->sectors = hdg.d_nsectors;
224 geom->total_sectors = hdg.d_secperunit;
236 geom->cylinders = dkg.dkg_ncyl;
237 geom->heads = dkg.dkg_nhead;
238 geom->sectors = dkg.dkg_nsect;
239 geom->total_sectors = (unsigned long long)dkg.dkg_ncyl * dkg.dkg_nhead
259 geom->cylinders = DEFAULT_HD_CYLINDERS;
260 geom->heads = DEFAULT_HD_HEADS;
261 geom->sectors = DEFAULT_HD_SECTORS;
265 geom->cylinders = DEFAULT_FD_CYLINDERS;
266 geom->heads = DEFAULT_FD_HEADS;
267 geom->sectors = DEFAULT_FD_SECTORS;
272 geom->total_sectors = st.st_blocks >> SECTOR_BITS;
274 geom->total_sectors = (unsigned long long)geom->cylinders *
275 geom->heads * geom->sectors;
279 if (geom->flags == -1)