Changeset b94334f in mainline for uspace/srv/bd/ata_bd/ata_bd.c


Ignore:
Timestamp:
2009-08-22T14:24:03Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a99cf073
Parents:
0e6dce8
Message:

Structure for identify data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/ata_bd/ata_bd.c

    r0e6dce8 rb94334f  
    261261static int disk_init(disk_t *d, int disk_id)
    262262{
    263         uint16_t buf[256];
     263        identify_data_t idata;
    264264        uint8_t model[40];
    265265        uint16_t w;
     
    269269        int i;
    270270
    271         rc = drive_identify(disk_id, buf);
     271        rc = drive_identify(disk_id, &idata);
    272272        if (rc != EOK) {
    273273                d->present = false;
     
    275275        }
    276276
    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;
    280280
    281281        d->blocks = d->cylinders * d->heads * d->sectors;
     
    285285         */
    286286        for (i = 0; i < 20; i++) {
    287                 w = buf[27 + i];
     287                w = idata.model_name[i];
    288288                model[2 * i] = w >> 8;
    289289                model[2 * i + 1] = w & 0x00ff;
Note: See TracChangeset for help on using the changeset viewer.