aboutsummaryrefslogtreecommitdiffstats
path: root/src/hw/ahci.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-09-28 23:34:49 -0400
committerKevin O'Connor <kevin@koconnor.net>2013-10-14 21:37:56 -0400
commit8ab9a34d67470b94a3f468e460fa1a687062a4c0 (patch)
tree8428ca03796bcd67dc3f2f2d1e007e97bf1a168d /src/hw/ahci.c
parent85f8fac87526341d775b02a0bfbc29d97f3ba22a (diff)
downloadseabios-8ab9a34d67470b94a3f468e460fa1a687062a4c0.tar.gz
Rename fields of 'struct chs_s' and use in floppy lba2chs().
Rename the fields of 'struct chs_s' so that it can be used both to describe a drive and to describe a particular sector on a drive. Update floppy.c:lba2chs() to return a 'struct chs_s' instead of passing the results via pointers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/ahci.c')
-rw-r--r--src/hw/ahci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/hw/ahci.c b/src/hw/ahci.c
index 3e594af0..9c2b390b 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -501,9 +501,9 @@ static int ahci_port_setup(struct ahci_port_s *port)
// found disk (ata)
port->drive.type = DTYPE_AHCI;
port->drive.blksize = DISK_SECTOR_SIZE;
- port->drive.pchs.cylinders = buffer[1];
- port->drive.pchs.heads = buffer[3];
- port->drive.pchs.spt = buffer[6];
+ port->drive.pchs.cylinder = buffer[1];
+ port->drive.pchs.head = buffer[3];
+ port->drive.pchs.sector = buffer[6];
u64 sectors;
if (buffer[83] & (1 << 10)) // word 83 - lba48 support