diff options
author | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-24 23:12:51 +1100 |
---|---|---|
committer | Omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-02-24 23:12:51 +1100 |
commit | a1209776eb50b1488f02912a6c74481f107c0284 (patch) | |
tree | 2ea3df4ac75e29b9bff083ebf754386df312cf6c /src/platform/file.c | |
parent | fb070f793e36932e052af8eee73c57703d90ce98 (diff) |
readd error text to file loading
Diffstat (limited to 'src/platform/file.c')
-rw-r--r-- | src/platform/file.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/platform/file.c b/src/platform/file.c index 497a95c..45c5b30 100644 --- a/src/platform/file.c +++ b/src/platform/file.c @@ -1,18 +1,21 @@ #include "file.h" +#include <errno.h> #include <stdbool.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> +#include "log.h" + const char *string_from_file(const char *path) { FILE *f = fopen(path, "rb"); if (f == NULL) { - // ERROR("Error reading file: %s. errno: %d", path, errno); + ERROR("Error reading file: %s. errno: %d", path, errno); return NULL; } if (ferror(f)) { - // ERROR("Error reading file: %s. errno: %d", path, errno); + ERROR("Error reading file: %s. errno: %d", path, errno); return NULL; } fseek(f, 0, SEEK_END); |