summaryrefslogtreecommitdiff
path: root/com32/lib/sys/fileread.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/sys/fileread.c')
-rw-r--r--com32/lib/sys/fileread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/com32/lib/sys/fileread.c b/com32/lib/sys/fileread.c
index aab99c80..26b0ceb6 100644
--- a/com32/lib/sys/fileread.c
+++ b/com32/lib/sys/fileread.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <string.h>
#include <com32.h>
+#include <pmapi.h>
#include <syslinux/pmapi.h>
#include <minmax.h>
#include "file.h"
@@ -42,7 +43,7 @@ int __file_get_block(struct file_info *fp)
{
ssize_t bytes_read;
- bytes_read = __com32.cs_pm->read_file(&fp->i.fd.handle, fp->i.buf,
+ bytes_read = pmapi_read_file(&fp->i.fd.handle, fp->i.buf,
MAXBLOCK >> fp->i.fd.blocklg2);
if (!bytes_read) {
errno = EIO;
@@ -67,7 +68,7 @@ ssize_t __file_read(struct file_info * fp, void *buf, size_t count)
if (count > MAXBLOCK) {
/* Large transfer: copy directly, without buffering */
- ncopy = __com32.cs_pm->read_file(&fp->i.fd.handle, bufp,
+ ncopy = pmapi_read_file(&fp->i.fd.handle, bufp,
count >> fp->i.fd.blocklg2);
if (!ncopy) {
errno = EIO;