aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-05-08 16:48:38 -0400
committerB. Watson <urchlay@slackware.uk>2024-05-08 16:48:38 -0400
commitab5cc383546a5d2dfa3a0ebc737a4512db60f77b (patch)
treea03af412490ab6444c0a6f28dad6b7ca50750c5a
parent0c5bfe1c03d22dfecf1f4c0571acfdf1673f18db (diff)
downloadbw-atari8-tools-ab5cc383546a5d2dfa3a0ebc737a4512db60f77b.tar.gz
fenders: report errors and exit if axe fails for -b, -d options.
-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) {