Make loadlist empty when booting Horizon, more nxboot.c code

This commit is contained in:
TuxSH
2018-05-14 21:17:06 +02:00
parent c2b22a6bf2
commit 15bba0ba0c
10 changed files with 179 additions and 82 deletions

View File

@@ -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) {