From 1a89e8b60e3c8970b7ae1248c5ca8ca8c82d09a5 Mon Sep 17 00:00:00 2001 From: Bogdan George Stefan Date: Mon, 30 Jun 2014 15:40:03 +0300 Subject: [PATCH] Enable SD card format When an SD card has no MBR it cannot be formatted and then mounted by Android. This is because the device node was incremented by one by mistake when building the device path Change-Id: I8533c6028151fe28246e74f89a294c1e58e79438 Signed-off-by: Bogdan George Stefan --- Volume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Volume.cpp b/Volume.cpp index ca56d1c..0baf008 100644 --- a/Volume.cpp +++ b/Volume.cpp @@ -252,7 +252,7 @@ int Volume::formatVol(bool wipe) { dev_t diskNode = getDiskDevice(); dev_t partNode = MKDEV(MAJOR(diskNode), - MINOR(diskNode) + (formatEntireDevice ? 1 : mPartIdx)); + MINOR(diskNode) + (formatEntireDevice ? 0 : mPartIdx)); setState(Volume::State_Formatting);