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