]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/strerror.c
Add makefiles (replace Tup)
[z180-stamp.git] / avr / strerror.c
index d80a3bce1982c0f91412a18d88d08539f099e880..199504a7ad5bf59b5c59974cc9e1dbb48bfe2bfa 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"),                                              /* 101 */
+       FSTR("Interrupt"),                              /* 102 */
+       FSTR("Bus timeout"),                            /* 103 */
+       FSTR("Unexpected argument"),                    /* 104 */
+       FSTR("Invalid disk number"),                    /* 105 */
+       FSTR("Disk already attached"),                  /* 106 */
+       FSTR("Disk not attached"),                      /* 107 */
+       FSTR("Error opening file"),                     /* 108 */
+       FSTR("File already attached to other drive"),   /* 109 */
+       FSTR("CPU is running"),                         /* 110 */
+       FSTR("Invalid argument"),                       /* 111 */
+       FSTR("Unexpected EOF"),                         /* 112 */
+
 };
 
-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;