Make loadlist empty when booting Horizon, more nxboot.c code
This commit is contained in:
@@ -1,8 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/stat.h>
|
||||
#include "fs_utils.h"
|
||||
#include "hwinit.h"
|
||||
#include "sdmmc.h"
|
||||
|
||||
size_t get_file_size(const char *filename) {
|
||||
struct stat st;
|
||||
if (stat(filename, &st) == -1) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return (size_t)st.st_size;
|
||||
}
|
||||
|
||||
size_t read_from_file(void *dst, size_t dst_size, const char *filename) {
|
||||
FILE *file = fopen(filename, "rb");
|
||||
if (file == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user