]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/strerror.c
mcd_mem.c: use cmd_error(), z80_bus_request_or_exit()
[z180-stamp.git] / avr / strerror.c
index d80a3bce1982c0f91412a18d88d08539f099e880..a4d2a67340c76c35dc022ba14d3a6452413635fc 100644 (file)
@@ -7,18 +7,30 @@
 #include "common.h"
 #include "cmd_fat.h"
 
+
 static const FLASH char * const FLASH error_strings[] = {
-       FSTR("Unknown error")
+       FSTR("Unknown error"),
+       FSTR("Not enough memory"),
+       FSTR("Interrupt"),
+       FSTR("Bus timeout"),
+       FSTR("Unexpected argument"),
+       FSTR("Invalid disk number"),
+       FSTR("Disk already attached"),
+       FSTR("Disk not attached"),
+       FSTR("Error opening file"),
+       FSTR("File already attached to other drive"),
+       FSTR("CPU is running"),
+       FSTR("Invalid argument"),
+       FSTR("Unexpected EOF"),
+
 };
 
-const FLASH char * my_strerror_P(int errnum)
+const FLASH char * my_strerror_P(ERRNUM errnum)
 {
        if (errnum < 100)
                return fat_rctostr(errnum);
 
        errnum -= 100;
-       if (errnum < 0)
-               errnum = 0;
        if ((unsigned) errnum >= ARRAY_SIZE(error_strings))
                errnum = 0;