report error on failure

This commit is contained in:
Dave Murphy 2018-04-18 23:24:19 +01:00
parent 23f89a9c86
commit b8bee5d4ee

View File

@ -1,5 +1,6 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h>
#include <switch.h> #include <switch.h>
@ -22,6 +23,8 @@ void printfile(const char* path)
} }
printf(">>EOF<<\n"); printf(">>EOF<<\n");
fclose(f); fclose(f);
} else {
printf("errno is %d, %s\n", errno, strerror(errno));
} }
} }