freemyipod r933 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r932‎ | r933 | r934 >
Date:01:30, 6 June 2014
Author:theseven
Status:new
Tags:
Comment:
emCORE: Fix get_storage_info USB debugger command
Modified paths:
  • /emcore/trunk/usb/usbdebug.c (modified) (history)

Diff [purge]

Index: emcore/trunk/usb/usbdebug.c
@@ -533,6 +533,7 @@
534534 buf[0] = 1;
535535 storage_get_info(buf[1], (struct storage_info*)&buf[4]);
536536 buf[1] = 1;
 537+ len = (sizeof(struct storage_info) + 3) / 4 * 4;
537538 break;
538539 case 28: // STORAGE_READ_SECTORS_MD
539540 buf[0] = 1;
@@ -711,7 +712,7 @@
712713 dbgstate = DBGSTATE_RESPOND;
713714 dbgmemaddr = addr;
714715 dbgmemlen = len;
715 - memcpy(dbgbuf, buf, 64);
 716+ memcpy(dbgbuf, buf, 16);
716717 }
717718 }
718719 dbgbusy = false;