mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-07-01 09:12:14 +02:00
report error on failure
This commit is contained in:
parent
23f89a9c86
commit
b8bee5d4ee
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user