aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fenders.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fenders.c b/fenders.c
index fc44754..ce3b242 100644
--- a/fenders.c
+++ b/fenders.c
@@ -133,12 +133,17 @@ void set_screen_off(density dens) {
fendersdbl_bin[OFFSET_SCREENOFF_DD] = 0x8d;
}
-/* TODO: error checking */
void call_axe(const char *args, const char *fname) {
+ int ret;
char cmd[8192];
+
sprintf(cmd, "axe %s %s", args, fname);
- fprintf(stderr, SELF ": calling axe, cmd is: %s\n", cmd);
- system(cmd);
+ ret = system(cmd);
+
+ if(ret) {
+ fprintf(stderr, SELF ": \"%s\" failed, status %d\n", cmd, ret);
+ exit(1);
+ }
}
int main(int argc, char **argv) {