kern
diff src/ata.c @ 90:7ff2b4971216
started work on the filesystem
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 09 Dec 2011 13:44:15 +0200 |
parents | 2f555c81ae67 |
children |
line diff
1.1 --- a/src/ata.c Thu Dec 08 18:19:35 2011 +0200 1.2 +++ b/src/ata.c Fri Dec 09 13:44:15 2011 +0200 1.3 @@ -110,6 +110,16 @@ 1.4 return ndev; 1.5 } 1.6 1.7 +uint64_t ata_num_sectors(int devno) 1.8 +{ 1.9 + struct device *dev = devices + devno; 1.10 + 1.11 + if(dev->nsect_lba48) { 1.12 + return dev->nsect_lba48; 1.13 + } 1.14 + return dev->nsect_lba; 1.15 +} 1.16 + 1.17 int ata_read_pio(int devno, uint64_t sect, void *buf) 1.18 { 1.19 return readwrite_pio(devno, sect, buf, read_data);