summaryrefslogtreecommitdiffstats
path: root/src/operations.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-11-21 14:15:22 +0100
committerPali Rohár <pali.rohar@gmail.com>2012-11-21 14:15:22 +0100
commit82dd53542902f980a6111e62b6732d08c5b3ed47 (patch)
tree57cbbd09321cbcc10360d270179eb295d1820ab3 /src/operations.c
parent288726981a158c894c223fa762b71baadd89e467 (diff)
download0xFFFF-82dd53542902f980a6111e62b6732d08c5b3ed47.tar.bz2
operations: Rebooting in cold flash mode does not make sense, instead boot to NOLO
Diffstat (limited to 'src/operations.c')
-rw-r--r--src/operations.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/operations.c b/src/operations.c
index 02adaf4..4a63c09 100644
--- a/src/operations.c
+++ b/src/operations.c
@@ -249,12 +249,14 @@ int dev_reboot_device(struct device_info * dev) {
enum usb_flash_protocol protocol = dev->usb->flash_device->protocol;
- if ( protocol == FLASH_NOLO )
+ if ( protocol == FLASH_COLD )
+ return leave_cold_flash(dev->usb);
+ else if ( protocol == FLASH_NOLO )
return nolo_reboot_device(dev->usb);
else if ( protocol == FLASH_MKII )
return mkii_reboot_device(dev->usb);
else {
- ERROR("Rebooting device in Cold Flash or RAW disk mode is not supported");
+ ERROR("Rebooting device in RAW disk mode is not supported");
return -1;
}