operations: Enable dumping mmc images via USB disk protocol

This commit is contained in:
Pali Rohár committed 2014-11-21 16:41:05 +01:00
1 parent 93680de944
commit d3eb042a1c
1 file changed
+8 -1
+8 -1
View File
@@ -194,8 +194,15 @@ int dev_dump_image(struct device_info * dev, enum image_type image, const char *
return local_dump_image(image, file); return local_dump_image(image, file);
if ( dev->method == METHOD_USB ) { if ( dev->method == METHOD_USB ) {
ERROR("Dump image via USB is not supported");
enum usb_flash_protocol protocol = dev->usb->flash_device->protocol;
if ( protocol == FLASH_DISK )
return disk_dump_image(dev->usb, image, file);
ERROR("Dump image via USB not in Mass Storage Mode is not supported");
return -1; return -1;
} }
return -1; return -1;