From b8bee5d4ee3bc1a78f1b74d46fbd6ea53aad0443 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Wed, 18 Apr 2018 23:24:19 +0100 Subject: [PATCH] report error on failure --- fs/romfs/source/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/romfs/source/main.c b/fs/romfs/source/main.c index 3510a1f..b881995 100644 --- a/fs/romfs/source/main.c +++ b/fs/romfs/source/main.c @@ -1,5 +1,6 @@ #include #include +#include #include @@ -22,6 +23,8 @@ void printfile(const char* path) } printf(">>EOF<<\n"); fclose(f); + } else { + printf("errno is %d, %s\n", errno, strerror(errno)); } }