From df3004bd16b986b1f8299a7f9dfdbe4bdb144ed7 Mon Sep 17 00:00:00 2001 From: mik_os Date: Tue, 26 Apr 2011 19:15:22 +0300 Subject: [PATCH] Try to mount vol->device2 partition to UMS. Stock sd-card that ships with LG-P500 formatted with no partitions. This issue can be handled with device2 in recovery.fstab. But UMS didn't. We will try to mount second device (if it was defined) if first failed. Change-Id: Ia8b58b9fdfa3e63f703a1dd5870cb76936cec88e --- extendedcommands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extendedcommands.c b/extendedcommands.c index be93770..b691d10 100644 --- a/extendedcommands.c +++ b/extendedcommands.c @@ -353,7 +353,8 @@ void show_mount_usb_storage_menu() return -1; } - if (write(fd, vol->device, strlen(vol->device)) < 0) { + if ((write(fd, vol->device, strlen(vol->device)) < 0) && + (!vol->device2 || (write(fd, vol->device, strlen(vol->device2)) < 0))) { LOGE("Unable to write to ums lunfile (%s)", strerror(errno)); close(fd); return -1;