X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/414caa77d5709bf3372d1f9245312781eee7961b..b35fcb2f65a9c2dd17faae5b513eecca8032461b:/avr/strerror.c diff --git a/avr/strerror.c b/avr/strerror.c index d80a3bc..a4d2a67 100644 --- a/avr/strerror.c +++ b/avr/strerror.c @@ -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;