]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/z180-serv.c
Merge branch 'fatfs-integration' into fatcommands
[z180-stamp.git] / avr / z180-serv.c
index 0ce6b9bc51b587be5bb531bdf01cabde8b0a5d41..d1f52ddbac19f42e46b43e75bcd4ff679c66458f 100644 (file)
@@ -263,7 +263,7 @@ int drv_detach(uint8_t unit)
                        p->flags &= ~DRV_FLG_DIRTY;
                        p->img_name = NULL;
 
-                       uint32_t scb = getenv_ulong(ENV_CPM3_SCB, 16, 0);
+                       uint32_t scb = getenv_ulong(PSTR(ENV_CPM3_SCB), 16, 0);
                        if (scb && (z80_bus_cmd(Request) & ZST_ACQUIRED)) {
                                z80_write(scb + 0xf0, 0xff);
                                z80_write(p->dph + 11, 0xff);
@@ -415,10 +415,17 @@ void msg_cpm_result(uint8_t subf, uint8_t rc, int res)
 
        msg_xmit(2, subf, sizeof(result_msg), result_msg);
 
-       if (rc)
+       if (rc) {
+#if GCC_BUG_61443
+               char msg[40];
+               strncpy_P(msg, rc_messages[rc & 0x7f], sizeof msg -1);
+               drv_debug(END, PSTR(" rc: %.02x/%d, '%s'"),
+                                       rc, res, msg);
+#else
                drv_debug(END, PSTR(" rc: %.02x/%d, '%S'"),
                                        rc, res, rc_messages[rc & 0x7f]);
-       else
+#endif
+       } else
                drv_debug(END, PSTR(""));
 
 }