diff options
author | B. Watson <urchlay@slackware.uk> | 2024-05-08 16:48:38 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-05-08 16:48:38 -0400 |
commit | ab5cc383546a5d2dfa3a0ebc737a4512db60f77b (patch) | |
tree | a03af412490ab6444c0a6f28dad6b7ca50750c5a | |
parent | 0c5bfe1c03d22dfecf1f4c0571acfdf1673f18db (diff) | |
download | bw-atari8-tools-ab5cc383546a5d2dfa3a0ebc737a4512db60f77b.tar.gz |
fenders: report errors and exit if axe fails for -b, -d 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) { |