-static const FLASH char * const FLASH rc_messages[] = {
- FSTR("OK"),
- FSTR("Unknown error"),
- FSTR("Disk number out of range 0..7"),
- FSTR("Disk allready attached"),
- FSTR("Disk not attached"),
- FSTR("File not found"),
- FSTR("Not enough memory"),
- FSTR("Error opening file"),
- FSTR("File allready attached to other drive"),
- };
-
-static
-void printerror(int rc, uint8_t unit, char *fn)
-{
- if (rc < 0 || (unsigned) rc >= ARRAY_SIZE(rc_messages))
- rc = 1;
-
-#if GCC_BUG_61443
- printf_P(PSTR("Attachment of '%s' to dsk%d failed: "), fn, unit);
- my_puts_P(rc_messages[rc]);
- my_puts_P(PSTR("!\n"));
-#else
- printf_P(PSTR("Attachment of '%s' to dsk%d failed: %S!\n"),
- fn, unit, rc_messages[rc]);
-#endif
-}
-