X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/4122fe90c2fffbec62a431ac15fb4b373aecb1ea..8315e7f4ea0204718e520e48a48739fd0371bd28:/avr/cmd_attach.c diff --git a/avr/cmd_attach.c b/avr/cmd_attach.c index 9fbfa1e..fcc4f49 100644 --- a/avr/cmd_attach.c +++ b/avr/cmd_attach.c @@ -8,9 +8,7 @@ * attach channels to devices */ -#include "common.h" -#include -#include +#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; @@ -80,7 +78,7 @@ command_ret_t do_attach(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[ } /* reset getopt() */ - optind = 1; + optind = 0; int opt; while ((opt = getopt(argc, argv, PSTR("darwo:"))) != -1) {