From d0faf471b8543ffaa32346d3c673f145ead7e068 Mon Sep 17 00:00:00 2001 From: Christian Groessler Date: Tue, 14 Jun 2016 20:44:57 +0200 Subject: [PATCH] Some improvements to Atari exec() after review. --- libsrc/atari/exec.s | 6 ++---- testcode/lib/tinyshell.c | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/libsrc/atari/exec.s b/libsrc/atari/exec.s index 2835a2206..4ae30fdbf 100644 --- a/libsrc/atari/exec.s +++ b/libsrc/atari/exec.s @@ -33,10 +33,8 @@ notsupp:lda #ENOSYS ; "unsupported system call" .byte $2C ; bit opcode, eats the next 2 bytes noiocb: lda #EMFILE ; "too many open files" jsr incsp2 ; clean up stack -seterr: jsr __directerrno - lda #$FF - tax - rts ; return -1 +seterr: jmp __directerrno + ; entry point diff --git a/testcode/lib/tinyshell.c b/testcode/lib/tinyshell.c index b5654983e..c83bd14e8 100644 --- a/testcode/lib/tinyshell.c +++ b/testcode/lib/tinyshell.c @@ -356,7 +356,6 @@ static void cmd_rename(void) static void cmd_exec(void) { - int st; unsigned char *progname, *arguments; progname = strtok(args, " \t\n"); @@ -367,7 +366,7 @@ static void cmd_exec(void) arguments = strtok(NULL, ""); /*printf("exec: %s %s\n", progname, arguments ? arguments : "");*/ - st = exec(progname, arguments); + (void)exec(progname, arguments); printf("exec error: %s\n", strerror(errno)); } -- 2.39.5