From d3eb042a1c1ba330f41fc61cfc270145b97f486d Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Fri, 21 Nov 2014 16:41:05 +0100 Subject: operations: Enable dumping mmc images via USB disk protocol --- src/operations.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3