summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2014-11-21 16:41:05 +0100
committerPali Rohár <pali.rohar@gmail.com>2014-11-21 16:41:05 +0100
commitd3eb042a1c1ba330f41fc61cfc270145b97f486d (patch)
treea6e360bc4b7ebcf5437f62c2af8721cfc42c799a
parent93680de9442cbe5dbf1bcf871d1505e2f5da7817 (diff)
download0xFFFF-d3eb042a1c1ba330f41fc61cfc270145b97f486d.tar.bz2
operations: Enable dumping mmc images via USB disk protocol
-rw-r--r--src/operations.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/operations.c b/src/operations.c
index ae06b1d..6696fe1 100644
--- a/src/operations.c
+++ b/src/operations.c
@@ -194,8 +194,15 @@ int dev_dump_image(struct device_info * dev, enum image_type image, const char *
return local_dump_image(image, file);
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;