vfs: introduce adjustable ISO9660 buffer length for file reading

This commit is contained in:
2025-08-22 17:50:42 +03:00
parent 9bb6d9d1a5
commit 7c43956ebe
3 changed files with 7 additions and 5 deletions
+4 -4
View File
@@ -71,9 +71,9 @@ size_t vfs_read_file(l9660_file *file, uint8_t* buffer)
l9660_status status;
for(;;) {
char buf[128];
char buf[ISO_9660_BUFFER_LENGTH];
size_t read;
status = l9660_read(file, buf, 128, &read);
status = l9660_read(file, buf, ISO_9660_BUFFER_LENGTH, &read);
if (status != L9660_OK) {
printf("An error occurred during file read!\n");
@@ -97,8 +97,8 @@ size_t vfs_read_file_length(l9660_file *file, uint8_t* buffer, size_t length)
l9660_status status;
while(total_read < length) {
char buf[128];
size_t to_read = (length - total_read) < 128 ? (length - total_read) : 128;
char buf[ISO_9660_BUFFER_LENGTH];
size_t to_read = (length - total_read) < ISO_9660_BUFFER_LENGTH ? (length - total_read) : ISO_9660_BUFFER_LENGTH;
size_t read = 0;
status = l9660_read(file, buf, to_read, &read);