Changeset b94334f in mainline for uspace/srv/bd/ata_bd/ata_bd.c
- Timestamp:
- 2009-08-22T14:24:03Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a99cf073
- Parents:
- 0e6dce8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/ata_bd/ata_bd.c
r0e6dce8 rb94334f 261 261 static int disk_init(disk_t *d, int disk_id) 262 262 { 263 uint16_t buf[256];263 identify_data_t idata; 264 264 uint8_t model[40]; 265 265 uint16_t w; … … 269 269 int i; 270 270 271 rc = drive_identify(disk_id, buf);271 rc = drive_identify(disk_id, &idata); 272 272 if (rc != EOK) { 273 273 d->present = false; … … 275 275 } 276 276 277 d->cylinders = buf[1];278 d->heads = buf[3];279 d->sectors = buf[6];277 d->cylinders = idata.cylinders; 278 d->heads = idata.heads; 279 d->sectors = idata.sectors; 280 280 281 281 d->blocks = d->cylinders * d->heads * d->sectors; … … 285 285 */ 286 286 for (i = 0; i < 20; i++) { 287 w = buf[27 +i];287 w = idata.model_name[i]; 288 288 model[2 * i] = w >> 8; 289 289 model[2 * i + 1] = w & 0x00ff;
Note:
See TracChangeset
for help on using the changeset viewer.