summaryrefslogtreecommitdiff
path: root/com32/chain/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/chain/utility.c')
-rw-r--r--com32/chain/utility.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/com32/chain/utility.c b/com32/chain/utility.c
index 7a0ce61c..b17997f7 100644
--- a/com32/chain/utility.c
+++ b/com32/chain/utility.c
@@ -29,6 +29,7 @@
* ----------------------------------------------------------------------- */
#include <com32.h>
+#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
@@ -151,7 +152,7 @@ uint32_t get_file_lba(const char *filename)
/* Put the filename in the bounce buffer */
strlcpy(buf, filename, size);
- if (open_file(buf, &fd) <= 0) {
+ if (open_file(buf, O_RDONLY, &fd) <= 0) {
goto fail; /* Filename not found */
}