]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/cmd_attach.c
New debug command: dump heap
[z180-stamp.git] / avr / cmd_attach.c
index d7bcafd60bdf7e602be46c40a4109b0b984f020a..fcc4f4951e02ae07249f4e6104b3253d756c2dbf 100644 (file)
@@ -8,9 +8,7 @@
  * attach channels to devices
  */
 
-#include "common.h"
-#include <string.h>
-#include <stdbool.h>
+#include "cmd_attach.h"
 
 #include "command.h"
 #include "z180-serv.h"
@@ -35,10 +33,10 @@ void printerror(int rc, uint8_t unit, char *fn)
        if (rc < 0 || (unsigned) rc >= ARRAY_SIZE(rc_messages))
                rc = 1;
 
-#if GCC_BUG_61443 * 0
-               printf_P(PSTR("rc=%u FR_"), rc);
-               my_puts_P(rc_names[rc]);
-               my_puts_P(PSTR("\n"));
+#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]);
@@ -58,7 +56,7 @@ void printerror(int rc, uint8_t unit, char *fn)
  *
  */
 
-command_ret_t do_attach(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+command_ret_t do_attach(cmd_tbl_t *cmdtp, uint_fast8_t flag, int argc, char * const argv[])
 {
        uint8_t unit;
        char *filename = NULL;