exec_from_file and vfs: fix reading file
This commit is contained in:
+2
-11
@@ -49,8 +49,8 @@ void list_files(l9660_dir *dir)
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: fix invalid opcode exception that somehow happens when the memcpy is called with buffer+total_read address being 0xE0008CA0
|
||||
size_t vfs_read_file(l9660_file *file, uint8_t* buffer, size_t final_size)
|
||||
|
||||
size_t vfs_read_file(l9660_file *file, uint8_t* buffer)
|
||||
{
|
||||
size_t total_read = 0;
|
||||
l9660_status status;
|
||||
@@ -65,13 +65,6 @@ size_t vfs_read_file(l9660_file *file, uint8_t* buffer, size_t final_size)
|
||||
break;
|
||||
}
|
||||
|
||||
printf("total_read: %X status: %X buffer+total_read: %X/%X read: %X\n", total_read, status, buffer + total_read, final_size, read);
|
||||
if(buffer+total_read == 0xE0008CA0)
|
||||
{
|
||||
printf("ERROR ERROR\n");
|
||||
printf("get_physaddr: %X", get_physaddr((void*)0xE0008CA0));
|
||||
}
|
||||
|
||||
//check for EOF
|
||||
if (read == 0)
|
||||
break;
|
||||
@@ -80,7 +73,5 @@ size_t vfs_read_file(l9660_file *file, uint8_t* buffer, size_t final_size)
|
||||
total_read += read;
|
||||
}
|
||||
|
||||
printf("total_read: %X\n", total_read);
|
||||
|
||||
return total_read;
|
||||
}
|
||||
Reference in New Issue
Block a user