summaryrefslogtreecommitdiff
path: root/src/kernel/iso9660.c
diff options
context:
space:
mode:
authorBenji Dial <benji3.141@gmail.com>2020-01-05 22:26:40 -0500
committerBenji Dial <benji3.141@gmail.com>2020-01-05 22:26:40 -0500
commit243e28075e223bd9be145251161b692873918764 (patch)
treeb8b2314ae2e7303149780b7bfb25a7e61c6ebcfa /src/kernel/iso9660.c
parent3ec928b8ca8cbf51310bce62afafe0874e920c24 (diff)
downloadportland-os-243e28075e223bd9be145251161b692873918764.tar.gz
function to return pointers to functions to read from a constant interface, so we only have to check the interface once per macro operation
Diffstat (limited to 'src/kernel/iso9660.c')
-rw-r--r--src/kernel/iso9660.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/iso9660.c b/src/kernel/iso9660.c
index 742b34b..ef09116 100644
--- a/src/kernel/iso9660.c
+++ b/src/kernel/iso9660.c
@@ -24,8 +24,9 @@ OF THIS SOFTWARE.
bool iso_9660_parse_ph(uint8_t dn, uint8_t pn, uint32_t sector, uint8_t *buffer) {
uint32_t s = sector + 64;
+ read_sectors_t rsf = get_read_sectors_function(dn);
do {
- read_sectors(dn, s, 4, buffer);
+ rsf(drives[dn].number, s, 4, buffer);
if ((*buffer == 255) || (*(uint32_t *)&buffer[1] != 0x30304443) ||
(buffer[5] != (uint8_t)'1'))
return false;