diff options
-rw-r--r-- | fenders.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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) { |