From 243e28075e223bd9be145251161b692873918764 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 5 Jan 2020 22:26:40 -0500 Subject: function to return pointers to functions to read from a constant interface, so we only have to check the interface once per macro operation --- src/kernel/iso9660.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/kernel/iso9660.c') 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; -- cgit v1.2.3